Hello tout le monde,
Je suis à la recherche des grosses requêtes SQL qui saturent le tablespace UNDO.
Quelqu'un ici m'a parlé de la vue V$UNDOSTAT.
"V$UNDOSTAT displays a histogram of statistical data to show how well the system is working. The available statistics include undo space consumption, transaction concurrency, and length of queries executed in the instance. You can use this view to estimate the amount of undo space required for the current workload. Oracle uses this view to tune undo usage in the system. The view returns null values if the system is in manual undo management mode."
J'utilise le champ MAXQUERYID "SQL identifier of the longest running SQL statement in the period" mais je me demande si Oracle ne sélectionne QUE les requêtes mettant à jour le TBS UNDO ou s'il affiche même les requêtes qui n'y touchent pas?
Je me pose cette question car c'est un Select qui ressort à chaque fois...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 SELECT v.sql_text, u.BEGIN_TIME, u.END_TIME, u.UNDOBLKS, u.TXNCOUNT, u.MAXQUERYLEN, u.MAXQUERYID, u.NOSPACEERRCNT, u.ACTIVEBLKS, u.UNEXPIREDBLKS, u.EXPIREDBLKS FROM V$UNDOSTAT u, V$SQL v WHERE u.MAXQUERYID = v.SQL_ID ORDER BY BEGIN_TIME; SQL_TEXT BEGIN_TIME END_TIME UNDOBLKS TXNCOUNT MAXQUERYLEN MAXQUERYID NOSPACEERRCNT ACTIVEBLKS UNEXPIREDBLKS EXPIREDBLKS select 1 from obj$ where name='DBA_QUEUE_SCHEDULES' 03/19/2016 09:32:25 03/19/2016 09:42:25 3 43 215 0rc4km05kgzb9 0 224 668 808 107 312 select 1 from obj$ where name='DBA_QUEUE_SCHEDULES' 03/19/2016 09:32:25 03/19/2016 09:42:25 3 43 215 0rc4km05kgzb9 0 224 668 808 107 312 select 1 from obj$ where name='DBA_QUEUE_SCHEDULES' 03/19/2016 09:42:25 03/19/2016 09:52:25 0 2 816 0rc4km05kgzb9 0 224 668 808 107 312 select 1 from obj$ where name='DBA_QUEUE_SCHEDULES' 03/19/2016 09:42:25 03/19/2016 09:52:25 0 2 816 0rc4km05kgzb9 0 224 668 808 107 312 select ts# from ts$ where ts$.online$ != 3 and bitand(flags,2048) != 2048 03/19/2016 09:52:25 03/19/2016 10:02:25 7 348 1 012 1 407 89w8y2pgn25yd 0 224 668 808 107 312 select 1 from obj$ where name='DBA_QUEUE_SCHEDULES' 03/19/2016 10:02:25 03/19/2016 10:12:25 4 396 666 815 0rc4km05kgzb9 0 224 679 048 107 312 select 1 from obj$ where name='DBA_QUEUE_SCHEDULES' 03/19/2016 10:02:25 03/19/2016 10:12:25 4 396 666 815 0rc4km05kgzb9 0 224 679 048 107 312 select ts# from ts$ where ts$.online$ != 3 and bitand(flags,2048) != 2048 03/19/2016 10:12:25 03/19/2016 10:22:25 1 6 808 89w8y2pgn25yd 0 224 679 048 107 312 select 1 from obj$ where name='DBA_QUEUE_SCHEDULES' 03/19/2016 10:22:25 03/19/2016 10:32:25 3 38 812 0rc4km05kgzb9 0 224 679 048 107 312 select 1 from obj$ where name='DBA_QUEUE_SCHEDULES' 03/19/2016 10:22:25 03/19/2016 10:32:25 3 38 812 0rc4km05kgzb9 0 224 679 048 107 312 select 1 from obj$ where name='DBA_QUEUE_SCHEDULES' 03/19/2016 10:32:25 03/19/2016 10:42:25 0 3 208 0rc4km05kgzb9 0 224 679 048 107 312
Si je me suis trompé sur l'usage de cette table, merci de me dire où
Partager