mercredi 3 février 2016

SQLite Explain Query Plan BTree Improvement

I'm trying to optimize some SQLite queries. Using EXPLAIN QUERY PLAN I've been able to add some index's on the query to get rid of any "b-tree's". After optimizing, I've measured the performance, and not noticed any speed up in the queries.

Initial query

0|0|0|SEARCH TABLE ZOBJECT AS t0 USING INDEX ZOBJECT_Z_ENT_ZPROP1_ZDBPROP2_INDEX (Z_ENT=? AND ZPROP1=?) 
0|1|1|SEARCH TABLE Z_4PARENTS AS t1 USING COVERING INDEX sqlite_autoindex_Z_4PARENTS_1 (Z_4CHILDREN=?) 
0|0|0|USE TEMP B-TREE FOR ORDER BY

After optimization

0|0|0|SEARCH TABLE ZOBJECT AS t0 USING INDEX ZOBJECT_Z_ENT_ZPROP1_ZPROP2 (Z_ENT=? AND ZPROP1=?) 
0|1|1|SEARCH TABLE Z_4PARENTS AS t1 USING COVERING INDEX sqlite_autoindex_Z_4PARENTS_1 (Z_4CHILDREN=? AND Z_4PARENTS=?)

Is there anything else I can do to speed up my query?

Aucun commentaire:

Enregistrer un commentaire