Tim Romano <tim.romano...@gmail.com> wrote: > Igor, > Here's the example where a partial index can "hide" rows. > > From the wikipedia article cited by the OP: > > <wikipedia> > It is not necessary that the condition be the same as the index criterion; > Stonebraker's paper below presents a number of examples with indexes similar > to the following: > > create index partial_salary on employee(age) where salary > 2100; > > </wikipedia> > > What would happen if you issued these queries? > > select max(age) from employee > select avg(age) from employee > > Would the ages of employees earning <= 2100 be included?
Of course. The presence or absence of an index never affect the meaning of a query - just its performance. > Is the > partial-index used under those circumstances? No, I don't see how it could be beneficial for these queries. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users