Ken <kennethinbox-sqlite-/[EMAIL PROTECTED]> wrote:
I ran your cases and came up with this after adding the (22 record to
the stack)...
sqlite> explain query plan
...>
...> select s.id, p.id
...> from stack s, stackpop p
...> where s.value = p.value
...> and s.id < p.id
...> and (select count(*)
...> from stackpop p2
...> where p2.value=p.value
...> and p2.id < p.id
...> and s.id < p.id) =
...> (select count(*)
...> from stack s2
...> where s2.value=s.value
...> and s2.id > s.id
...> and s2.id < p.id );
I believe this only works by accident on your particular example. Try it
on a sequence that goes like: push push pop push pop pop.
Igor Tandetnik
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------