Re: Partitioned table scanning all pertitions when the where clause specifies the partition key

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/10/2024 18:16, Keith Fiske wrote:

Since your index is functional, in order to use the index, the queries must use that same function in the condition. Try doing

EXPLAIN SELECT * FROM customers where lastname = upper('BORRIS');

I thought you'd need to use the same function exactly.


EXPLAIN SELECT * FROM customers where upper(lastname) = upper('BORRIS');


As the index is on 'upper(lastname)', 'upper(lastname)' has to be in the query


Paul







[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux