On Jan 9, 2009, at 3:16 PM, Lukas Haase wrote: > > SELECT t.topic, t.length > FROM printgroup AS pg1 > LEFT JOIN printgroup AS pg2 ON pg1.printgroup = pg2.printgroup > LEFT JOIN topics AS t ON t.topicID = pg2.topicID > LEFT JOIN topic_ids AS ti ON ti.topicID = pg1.topicID > WHERE ti.topic_textID = 'XXXX' > ORDER BY pg2.topicID ASC; >
You seem very fond of using LEFT JOINs in places where they do not make good sense. What is it that you think a LEFT JOIN does? How is a LEFT JOIN different than an ordinary inner JOIN? I ask because I suspect that your answer will reveal misconceptions about LEFT JOINs which, when rectified, will cause most of your performance issues to go away. D. Richard Hipp d...@hwaci.com _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users