-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtr_moreinst.sql
More file actions
32 lines (30 loc) · 1.2 KB
/
tr_moreinst.sql
File metadata and controls
32 lines (30 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
REM tr_moreinst.sql
REM (c) Go-Faster Consultancy 2009
REM https://blog.psftdba.com/2009/02/do-you-need-more-temporary-table.html
REM When an AE process cannot obtain a private instance of a temporary record it writes a message (108,544) to the
REM message log. This query reports on the records/processes which required additional instances.
set lines 80
ttitle 'Processes Unable to Allocate Non-Shared Temporary Record'
column recname format a15 heading 'Record|Name'
column prcsname heading 'Process|Name'
column process_instance heading 'Last|Process|Instance'
column occurances heading 'Occurences'
column last_occurance heading 'Last|Occurence'
spool tr_moreinst
select p.message_parm recname, r.prcsname
, count(*) occurances
, max(l.dttm_stamp_sec) last_occurance
, max(p.process_instance) process_instance
from ps_message_log l
, ps_message_logparm p
left outer join psprcsrqst r
on r.prcsinstance = p.process_instance
where l.message_set_nbr = 108
and l.message_nbr = 544
and p.process_instance = l.process_instance
and p.message_seq = l.message_seq
and l.dttm_stamp_sec >= sysdate - 7
group by p.message_parm, r.prcsname
order by 1,2
/
spool off