Re: Unique index access path seems very slow
Date: Mon, 30 Jan 2023 22:19:59 +0000
Message-ID: <CAGtsp8k5Bq8gBP1r0R2QSx4k2Y+g69hBpHtHF6EbVFZr8cYzeA_at_mail.gmail.com>
- using RAW means each value is half the size, so the number of hash buckets can increase significantly for the same size memory, and that MAY help Oracle with elimination (though you still have to avoid the bitmap / Bloom filter getting too big)
- if you hash partition the encrypt_tab table N ways (N = a power of 2) and hash subpartition the trans_tab table to match then a bitmap / Bloom filter then Oracle can walk through each of the N pairs in turn and the bitmap / Bloom filter on each step can be just as big as the largest viable Bloom filter that you could create for the full data set but only have to cope with 1/Nth of the data, which means fewer collisions, more elimination, and much less data passing up the plan.
Side note: Unless things have changed in recent versions a 10104 trace will tell you about what's going on with the hash join, including the number of buckets in the hash table and the distribution of rows per bucket - that might be quite interesting and corroborate some of my comments about collisions/false positives etc.
Regards
Jonathan Lewis
On Mon, 30 Jan 2023 at 18:37, Pap <oracle.developer35_at_gmail.com> wrote:
> Yes Mark, that is kind of what I got to know from the requirements so far.
> And as I understood from this discussion so far, the encrypted raw value
> is 50% smaller in size and is the same irrespective of the client and is
> not going to change with the new oracle version etc. So we are in
> agreement with the dev team to change the column to RAW data type. However,
> considering that will be a design change and will take some time, we were
> trying to see if we can make the existing query run faster by any quick fix
> or code change etc. And as I posted the two sql monitors above, it appears
> to be the same query sometimes running for 30 minutes and
> sometimes ~10minutes, so trying to understand the cause and if we can make
> it consistent?
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Mon Jan 30 2023 - 23:19:59 CET