On 21 Sep 2013, at 12:14am, Jared Albers <[email protected]> wrote:

> I was unsure if the rowid of a subquery even existed until I selected it. I
> reviewed the output and determined that it was what I expected of a rowid
> from a subquery (simply an auto-incremented int of the result set in
> order). How/Why is the rowid of a subquery undefined when it always gives
> me the result I expect?

Because a earlier or later version of SQLite may make it act differently.  
Because it's undocumented, so the SQLite developers don't have to stick to a 
specific way of doing things.  They might find a way to speed up SELECTs in a 
future version that might change the way subquery rows are numbered.

Your extremely long SELECT with its sixteen COALESCEs and eight LEFT OUTER 
JOINs suggests that you have a schema which doesn't really suit the 'shape' of 
your data.  Another hint pointing in the same direction is numbered database 
names.  I think you might simplify your SELECT, reduce your data footprint, and 
speed up your query by rethinking your schema.

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to