>> Out of interest why must it completely READ each entire row?  Is it
>> because '*' has been used?
>
> The database reads a page at a time.  A page is, by default, 1024
> bytes.  A single page might contain multiple rows, or a single large
> row might be spread across multiple pages.

> When rows are only about 100 bytes in size, they will all fit on a
> single page, so the entire row ends up being read, though only the
> header is decoded and interpreted.

So what is the explanation for the 1.2 million row table taking 8
minutes, and the 5 million row table taking 40 seconds when the row in
the larger, faster table is larger than the smaller, slower one?  The
OP claims that the "average" row size is about 100 bytes for the
smaller table, and a "few hundred" for the larger table, which
suggests that either his estimates of row size are incorrect, or
something else is going on.  Perhaps the variance from "average"
accounts for the difference?

I'm interested because I might have this problem shortly, and I'd like
to understand the causes in order to attempt to avoid this type of
problem.

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

Reply via email to