Re: [sqlite] Views and Performance

2012-03-02 Thread Igor Tandetnik
On 3/2/2012 11:38 AM, Duquette, William H (318K) wrote: On 3/2/12 8:29 AM, "Igor Tandetnik" 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

Re: [sqlite] Views and Performance

2012-03-02 Thread Duquette, William H (318K)
On 3/2/12 8:31 AM, "Simon Davies" wrote: >On 2 March 2012 16:23, Duquette, William H (318K) > wrote: >> Howdy! >> >> Suppose I have two related tables, t1 and t2, and I write a view like >>this: >> >>CREATE VIEW myview AS SELECT

Re: [sqlite] Views and Performance

2012-03-02 Thread Duquette, William H (318K)
On 3/2/12 8:29 AM, "Igor Tandetnik" 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

Re: [sqlite] Views and Performance

2012-03-02 Thread Pavel Ivanov
pecified? > > RobR > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Duquette, William H > (318K) > Sent: Friday, March 02, 2012 11:23 AM > To: Discussion of SQLite Database > Subject: [sqlite] Vie

Re: [sqlite] Views and Performance

2012-03-02 Thread Rob Richardson
of SQLite Database Subject: [sqlite] Views and Performance Howdy! Suppose I have two related tables, t1 and t2, and I write a view like this: CREATE VIEW myview AS SELECT * FROM t1 JOIN t2 USING (some_column); If I am querying data just from t1, is there a performance penalty for using myview

Re: [sqlite] Views and Performance

2012-03-02 Thread Igor Tandetnik
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

Re: [sqlite] Views and Performance

2012-03-02 Thread Simon Davies
On 2 March 2012 16:23, Duquette, William H (318K) wrote: > Howdy! > > Suppose I have two related tables, t1 and t2, and I write a view like this: > >    CREATE VIEW myview AS SELECT * FROM t1 JOIN t2 USING (some_column); > > If I am querying data just from t1, is

Re: [sqlite] Views and Performance

2012-03-02 Thread Pavel Ivanov
> 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

[sqlite] Views and Performance

2012-03-02 Thread Duquette, William H (318K)
Howdy! Suppose I have two related tables, t1 and t2, and I write a view like this: CREATE VIEW myview AS SELECT * FROM t1 JOIN t2 USING (some_column); 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