Hi Simon,

Thanks for the reply.

On 10/9/2013 1:37 AM, Simon Slavin wrote:
I do not think this will solve your problem in one go, but execute the SQL 
command

ANALYZE

then try it again.  If it doesn't help, please post the new query plan.

The query plan hasn't changed:
0|0|0|SCAN TABLE itemdata AS TI (~1749597 rows)
0|1|1|SEARCH TABLE weekdays AS WD USING INTEGER PRIMARY KEY (rowid=?) (~1 rows)
0|0|0|USE TEMP B-TREE FOR GROUP BY

It was:
0|0|0|SCAN TABLE itemdata AS TI (~1000000 rows)
0|1|1|SEARCH TABLE weekdays AS WD USING INTEGER PRIMARY KEY (rowid=?) (~1 rows)
0|0|0|USE TEMP B-TREE FOR GROUP BY

I know I can do what I want to do in a programming language but since I have the correct SQL in hand, I am trying to see if it can be done within SQLite3 directly.

Here's an update. I tried the query with sqlite3 shell "3.8.0.2 2013-09-03 17:11:13" and "3.7.15.2 2013-01-09 11:53:05" and both of them work as expected. For now, I will proceed to use this since 3.7.4 is a bit dated already. I'm wondering now if somehow I have been using a custom build of SQLite shell...

Thanks for the help guys..

Best Regards,
Mohit.

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

Reply via email to