eremy Palmer
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Index usage with functions in where condition
Jeremy Palmer writes:
> This is the query that does not use the indexes:
> SELECT
> coo.nod_id,
> 640*radians(sqrt((coo.value1 - -41.0618)^2+((coo.value2 -
Jeremy Palmer writes:
> This is the query that does not use the indexes:
> SELECT
> coo.nod_id,
> 640*radians(sqrt((coo.value1 - -41.0618)^2+((coo.value2 -
> 175.58461)*cos(radians(-41.0618)))^2)) as distance
> FROM
> crs_coordinate coo
> WHERE
> coo.value1 between -41.0618-degrees(
I'm having trouble getting the query planner to use indexes. The situation
occurs when writing a query that uses functions for defining the parameters for
the conditions on the indexed columns. The system I'm running is Windows Server
2003, using version 8.4.2 of PostgreSQL.
This is the followi