forked from geekcomputers/Oracle-SQL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlitersql.sql
More file actions
18 lines (15 loc) · 469 Bytes
/
litersql.sql
File metadata and controls
18 lines (15 loc) · 469 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
REM Filename : litersql.sql
REM Author : Craig Richards
REM Created : 06-March-2009
REM Version : 1.0
REM Modifications :
REM
REM Description : Identify statements that could benefit converting to using bind variables
SET VERIFY OFF
SELECT SUBSTR(sql_text,1,60) "SQL", COUNT(*),SUM(executions) "TOTAL EXECUTIONS"
FROM v$sqlarea
WHERE executions < 5
GROUP BY SUBSTR(sql_text,1,60)
HAVING COUNT(*) > 20
ORDER BY 2;
REM End of Script