Re: Index working, but not inside function - Mailing list pgsql-sql

From Tom Lane
Subject Re: Index working, but not inside function
Date
Msg-id 2511.1184088264@sss.pgh.pa.us
Whole thread Raw
In response to Index working, but not inside function  (Patrick Clery <Patrick.Clery@gmail.com>)
List pgsql-sql
Patrick Clery <Patrick.Clery@gmail.com> writes:
> When I execute the function the query stalls and is apparently not taking 
> advantage of the index.

Your example doesn't demonstrate any such thing; what seems more likely
is that there are a whole lot of rows matching 'United States' and so
the query takes longer than you expect.  What would be convincing is
if you had actually *executed* the prepared query, on the same data not
different data, and timed that.
        regards, tom lane


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Database system identifier from SQL
Next
From: Peter Eisentraut
Date:
Subject: Re: Database system identifier from SQL