On Fri, Jun 25, 2010 at 7:26 PM, Simon Slavin <slav...@bigfraud.org> wrote:

>
> On 25 Jun 2010, at 2:39pm, Nilesh SIMARIA wrote:
>
> > select * from table where parent = ? and aid = ?;
> >
> > Our index is "create index idx on table (parent, aid)"
>
> That should do fine.  Make sure that columns which will hold integers are
> defined as INTEGER, not INT or NUMBER or anything like that.


Thanks Simon. We have one more column in table of type blob and we have to
do look up based on that column as well.

The query looks like this :-

"SELECT * from table where parent == ? and c_blob == ?"

We have to execute this query multiple times. So basically we have two
queries (first I explained previous mail) in that case how would you suggest
to create table

A) Two Indexed one on (parent, aid) and other on (parent, c_blob)
B) One Index on (parent, aid, c_blob)

Which one would be fast for select ?

Thanks,
Nilesh
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to