Subject | Re: Stored procedure performance |
---|---|
Author | Adam |
Post date | 2007-02-20T23:08:47Z |
> select entity_id, entity_name, entity_datein, link_id, link_linklinks.link_fk_entity_id)
> from entities
> inner join links on (entities.entity_id =
> whereYour problem is the 'not in' clause. Check the release notes, not in
> (entities.entity_id = :entity_id_in)
> and
> (links.link_id not in (
> select l_v_fk_link_id from links_visited where
> l_v_fk_link_visits_id = :link_v_id_in
> )
> )
> rows :rows_qty
is unable to use an index because of the possibility of nulls giving
you the wrong answer. Rewrite it as a 'not exists' and it will be fine.
Adam