Qiang wrote:
hello, two questions..
1. comparing select one or two columns from one row
from a bigger table ( 20,000 - 30,000 rows, 20 columns
).
with select the same column from one row from a smaller
table (20,000 - 30,000 rows, 2 columns). does it make
much different on performance? if yes, what makes it?

2. Comparing select a sequence number first from a
small table THEN select all rows from another table
that have the same sequence number ( hence two selects
)
   with
   join select on this two tables where they have the
same sequence number. any difference here?

Qiang,

Re 1: It will be slightly faster to get the data from a table with fewer columns if the required columns are at the end of the row since sqlite has to skip over the unused fields. But unless you have large fields the difference will be very small. It is more important to reduce the number of rows to scan, or provide an index so sqlite can locate the correct row more quickly.

Re 2: I suspect the join will always be faster since it essentially does the same thing but without the overhead of executing a second statement. If you only return the columns from the second table it will give the same results.

HTH
Dennis Cote

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to