On Wed, Oct 2, 2013 at 6:47 PM, Stephan Beal <sgb...@googlemail.com> wrote:

>
> a) is this a gross/unconscionable inefficiency or is this a viable
> strategy, provided the number of filters stays small (say, 2-3)?
>

The query optimizer in SQLite will probably flatten the nested views into a
single simple query.  So it probably doesn't matter.

You can verify this by running EXPLAIN QUERY PLAN.


>
> b) how much is this costing me (abstractly speaking), in terms of search
> performance? Is the search hit cost here linear (which should still be
> okay... except maybe for the core TCL repo) or is it worse?
>

I'm guessing that sqlite3_step() runs at the same speed.
sqlite3_prepare_v2() might take a couple extra microseconds, but not enough
extra time that you could measure it.


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

Reply via email to