Toad World® Forums

Adding a hint in filter definition

Hi is there any way to add a hint in filter (from grid) to get better execution performance.
I.e
select /*+ PARALLEL(SQL_PERF_FROM_HIST, 2) */
MONITORED_DATE,
MODULE,
SQL_ID,
NR_EXECS,
ELA_SECS,
AVG_EXEC,
NR_ROWS,
AVG_ROWS,
NR_LOG_READS,
AVG_LOG_READS,
PARSING_SCHEMA,
SQL_TEXT,
DESCRIPTION,
WINDOW
FROM Q383211.SQL_PERF_FROM_HIST
WHERE 1 = 1
ORDER BY MONITORED_DATE DESC,
AVG_EXEC DESC
instead of originally generated:
select
MONITORED_DATE,
MODULE,
SQL_ID,
NR_EXECS,
ELA_SECS,
AVG_EXEC,
NR_ROWS,
AVG_ROWS,
NR_LOG_READS,
AVG_LOG_READS,
PARSING_SCHEMA,
SQL_TEXT,
DESCRIPTION,
WINDOW
FROM Q383211.SQL_PERF_FROM_HIST
WHERE 1 = 1
ORDER BY MONITORED_DATE DESC,
AVG_EXEC DESC

Brg
Damir

Where in Toad is that query generated? I don’t recognize it.

Sorry for not be clear.
I want to add a hint somehow and normally, there is none in Toad like that.
Hope now is more clear.

Brg
Damir

If you are using the Schema Browser Data tab’s filter, then no, there’s no way to add a hint from that window (not a bad idea). But you can click the VIew/Edit query button and add the hint there. In the beta, you can name and save your edited query for easy recall later. Details here: https://www.toadworld.com/products/toad-for-oracle/b/weblog/archive/2016/12/23/named-queries-in-sb-tables-data