On Fri, 3 Apr 2009, Robert Haas wrote:
> On the other hand, the query planner should be figuring out which
> index to use without any help from you. If it's not, something is
> wrong.
Unfortunately it cannot tell that
SELECT l1.id AS id1, l2.id AS id2 FROM location l1, location l2
WHERE l1.start <= l2.end AND l2.start <= l1.end
is the same as
SELECT l1.id AS id1, l2.id AS id2 FROM location l1, location l2
WHERE bioseg_create(l1.start, l1.end) && bioseg_create(l2.start, l2.end)
which is also the same as
SELECT * from do_overlaps() AS (id1 int, id2 int)
But thanks for clarifying the rule thing for me.
Matthew
--
The email of the species is more deadly than the mail.