I have the next table

table1( id INTEGER, name VARCHAR, id2 INTEGER, name2 VARCHAR, year INTEGER
);

I have created the next indexes : index1( name ), index2( id2 ), index3(
name2 );

The database have about 200,000 records.
The next query takes about 2 seconds and I think its too much.

SELECT id, name, id2, name2 GROUP BY id ORDER BY name2, year DESC LIMIT 0,
15

If I remove the sorting condition the query is instantaneous.

How can I make it faster?

Thanks in advance
J.Rios
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to