On Fri, Apr 04, 2008 at 11:19:53AM -0400, Samuel Neff scratched on the wall: > Scott, > > Is it really a full table scan or just an index scan (at least in the case > where no data is needed from the table as in the original sample that had no > join or where clause).
I wondered about this myself, and did some digging last night. "count(*)" is translated into a zero-argument version of "count", so no actual column data is required if it is applied directly to a whole, real table. From the VDBE codes, it looks like it is just walks the B-tree of the table (which is the same as an index scan), but never actually reads the rows. 'Next' is called, but 'Column' is not. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "'People who live in bamboo houses should not throw pandas.' Jesus said that." - "The Ninja", www.AskANinja.com, "Special Delivery 10: Pop!Tech 2006" _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

