On 3/2/2012 11:38 AM, Duquette, William H (318K) wrote:
On 3/2/12 8:29 AM, "Igor Tandetnik"<itandet...@mvps.org>  wrote:
On 3/2/2012 11:29 AM, Pavel Ivanov wrote:
If I am querying data just from t1, is there a performance penalty
for using myview in the query?  Or will the query planner generate
approximately the same bytecode as it would if I'd simply queried
t1?

Yes, there is performance penalty and no it can't generate the same
bytecode. If you ask why the answer is because result set from the
view can be different than from the table alone - several rows in the
view can contain information from the same row of t1.

... while some other rows from t1 may not appear at all.

I was assuming that there's a strict many-to-one relationship between t1
and t2. (Should have said.)

You may know there is, but SQLite doesn't, and has to plan for the worst case.
--
Igor Tandetnik

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

Reply via email to