RE: query taking a long time
Date: Thu, 5 Nov 2020 14:31:00 -0500
Message-ID: <315901d6b3aa$31a6b730$94f42590$_at_rsiz.com>
Prune ALLC1 down to the specific user, table_name, and constraint type before the join, just as you did for ALLC2.
That would be the first thing I would try.
Second step: Add materialize to each inline projection if no cure.
The point is that you probably want to join the two smallish sets (constraints of 2 different sets of particular types on a specific table from a single user) and then join them on name, instead of probing a potentially huge list of all constraints for a matching user. Since the two halves are already reduced to the user, table_name, type_sets you want, I *think* all you need on the join is constraint_name if you first reduce ALLC1 as suggested.
Third step: If the CBO is not convinced by that, actually produce the two tiny gtts representing the sets and join them. (And maybe file an SR if you get past step one, but certainly file an SR if you need step 3).
Good luck.
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of ahmed.fikri_at_t-online.de
Sent: Wednesday, November 04, 2020 12:51 PM
To: list, oracle
Subject: query taking a long time
Hi all,
Ahmed
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Nov 05 2020 - 20:31:00 CET
- image/png attachment: image001.png