Hey everyone.
 
new to SQLite so please have patience with me
having two tables and doing left outer join
 
A
IDI INTEGER PRIMARY KEY
Parent INTEGER INDEX
Status INTEGER
....
 
B
IDR UNIQUE INTEGER FOREIGN KEY IndexME.IDI
Points TEXT (at average ~120 character string)
.... (this table is primarily used for large data, so it contains some blobs 
etc...)
 
SELECT A.IDI, B.Text
FROM A
LEFT OUTER JOIN B ON B.IDR = A.IDI
WHERE Parent = ?
 
query written here is a lot simplified (for example "Points" column is filtered 
using custom function) however main culprit seems to be LEFT OUTER JOIN as 
accessing that same column in query which only has B table in it is lightning 
fast.
result of query is just around 40 rows, (due to Parent filter) and it takes ~2 
seconds on I7 3.4Ghz with database stored on SSD HDD.....
 
am I doing something terribly wrong ? suggestions ?
 
oh and I tried running ANALYZE on database connection without any visible 
improvement.
 
thanks in advance,
M.
 
 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to