public inbox for [email protected]
help / color / mirror / Atom feedFrom: Paul Smith* <[email protected]>
To: [email protected]
Subject: Re: Partitioned table scanning all pertitions when the where clause specifies the partition key
Date: Thu, 24 Oct 2024 18:28:55 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAODZiv4jfNWNwQR8hwsVRrwD95i_cGDvAt9=BmzzaB2u2thygA@mail.gmail.com>
References: <[email protected]>
<CAODZiv4jfNWNwQR8hwsVRrwD95i_cGDvAt9=BmzzaB2u2thygA@mail.gmail.com>
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
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Partitioned table scanning all pertitions when the where clause specifies the partition key
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox