Does QxOrm support Create Column Index?

Forum for posting problems using QxOrm library

Does QxOrm support Create Column Index?

Postby magicu » Mon Jun 11, 2012 2:17 pm

I'm using sqlite with a mass of data.

What I'm doing is something like this: First, I query a record from a table, if there is no existed, then insert a new one.

I know Index will reduce query time, any other suggestion?
magicu
 
Posts: 54
Joined: Fri Jan 20, 2012 9:51 am

Re: Does QxOrm support Create Column Index?

Postby QxOrm admin » Mon Jun 11, 2012 5:02 pm

Hi,

I know Index will reduce query time, any other suggestion ?

You are right : create some indexes can improve your queries !
You must create your indexes on database side, not on QxOrm library side (using SQLite Manager for example).

If you want to define some indexes into your qx::register_class<T> functions, you can use property bag mechanism.
Using property bag, you can add some meta-data to introspection engine of QxOrm library.
Here is the class documentation : http://www.qxorm.com/doxygen/html/class ... y_bag.html

Then, adding some meta-data to introspection engine, you can use them to create your own SQL schema.
More details in this Q&R of the FAQ : http://www.qxorm.com/qxorm_en/faq.html#faq_230
Or here (read the commented code) : http://www.qxorm.com/qxorm_en/resource/ ... chema.html
QxOrm admin
 


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 5 guests