Am Freitag, 25. Februar 2005 17:54 schrieb Dave Smith:
> >From my reading of that statement it says it is going to use the index
>
> to match company_id=1000 and then fetch the row and compare
> product_desc. Where as in the the case without the like it is using
> product description in the Index Condition.

Well, the truth is that it has *the option* to use the index, but it doesn't 
have to.  This really mostly independent of the LIKE index issue.  If you 
think that the plan choice is not optimal, try EXPLAIN ANALYZE and post the 
results if you need help interpreting them.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to