explain.depesz.com

A tool for finding a real cause for slow queries.

Result: 1i1

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.022 20,206.130 ↑ 1.8 15 1

GroupAggregate (cost=17,071.27..17,071.37 rows=27 width=32) (actual time=20,206.114..20,206.130 rows=15 loops=1)

  • Output: a.version_title, count(*)
2. 0.159 20,206.108 ↓ 4.5 121 1

Sort (cost=17,071.27..17,071.28 rows=27 width=32) (actual time=20,206.102..20,206.108 rows=121 loops=1)

  • Output: a.version_title
  • Sort Key: a.version_title
  • Sort Method: quicksort Memory: 30kB
3. 0.028 20,205.949 ↓ 4.5 121 1

Subquery Scan a (cost=13,644.24..17,071.14 rows=27 width=32) (actual time=665.993..20,205.949 rows=121 loops=1)

  • Output: a.version_title
4. 5,249.393 20,205.921 ↓ 4.5 121 1

GroupAggregate (cost=13,644.24..17,071.08 rows=27 width=35) (actual time=665.991..20,205.921 rows=121 loops=1)

  • Output: l.database_name, max(v.version_title), sum(l.rpc_count)
5. 13,978.770 14,956.528 ↓ 9.9 6,764,518 1

Merge Join (cost=13,644.24..16,045.33 rows=683,780 width=35) (actual time=542.612..14,956.528 rows=6,764,518 loops=1)

  • Output: v.version_title, l.database_name, l.rpc_count
  • Merge Cond: ((h.database_name = l.database_name) AND (h.server_name = l.server_name))
6. 25.059 44.870 ↑ 1.0 6,201 1

Sort (cost=1,205.87..1,209.03 rows=6,310 width=35) (actual time=44.109..44.870 rows=6,201 loops=1)

  • Output: v.version_title, h.database_name, h.server_name
  • Sort Key: h.database_name, h.server_name
  • Sort Method: quicksort Memory: 683kB
7. 11.375 19.811 ↑ 1.0 6,201 1

Hash Join (cost=1.26..1,126.22 rows=6,310 width=35) (actual time=0.269..19.811 rows=6,201 loops=1)

  • Output: v.version_title, h.database_name, h.server_name
  • Hash Cond: (h.script_number = v.db_version)
8. 8.405 8.405 ↓ 1.0 89,684 1

Seq Scan on db_script_history h (cost=0.00..1,000.29 rows=89,644 width=29) (actual time=0.010..8.405 rows=89,684 loops=1)

  • Output: h.db_script_history_id, h.server_name, h.database_name, h.script_number, h.date_executed
9. 0.013 0.031 ↑ 1.0 57 1

Hash (cost=1.11..1.11 rows=57 width=14) (actual time=0.031..0.031 rows=57 loops=1)

  • Output: v.version_title, v.db_version
10. 0.018 0.018 ↑ 1.0 57 1

Seq Scan on sp5_version v (cost=0.00..1.11 rows=57 width=14) (actual time=0.011..0.018 rows=57 loops=1)

  • Output: v.version_title, v.db_version
11. 867.165 932.888 ↓ 67.8 6,768,441 1

Sort (cost=12,438.14..12,488.07 rows=99,867 width=34) (actual time=498.492..932.888 rows=6,768,441 loops=1)

  • Output: l.database_name, l.rpc_count, l.server_name
  • Sort Key: l.database_name, l.server_name
  • Sort Method: quicksort Memory: 16518kB
12. 45.034 65.723 ↓ 1.3 132,781 1

Bitmap Heap Scan on sp5_log_part_sum l (cost=1,243.04..10,779.58 rows=99,867 width=34) (actual time=22.048..65.723 rows=132,781 loops=1)

  • Output: l.database_name, l.rpc_count, l.server_name
  • Recheck Cond: (date_logged > (now() - '3 mons'::interval))
13. 20.689 20.689 ↓ 1.4 136,838 1

Bitmap Index Scan on idx_sp5_log_part_sum_date (cost=0.00..1,238.05 rows=99,867 width=0) (actual time=20.689..20.689 rows=136,838 loops=1)

  • Index Cond: (date_logged > (now() - '3 mons'::interval))