explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lqdT

Settings
# exclusive inclusive rows x rows loops node
1. 0.582 300.511 ↓ 0.0 0 1

Sort (cost=72,691.56..72,695.33 rows=1,510 width=194) (actual time=300.511..300.511 rows=0 loops=1)

  • Sort Key: t4._fld787_type, t4._fld787_n, t4._fld787_s, t8._code, t6._enumorder, t7._enumorder
  • Sort Method: quicksort Memory: 25kB
  • OR (sum((sum('0'::numeric))) <> '0'::numeric) OR (sum((((sum('0'::numeric)) + (sum(CASE WHEN (t3._recordkind = '0'::numeric) THEN t3._fld3011 ELSE '0'::numeric END))) - (sum(CASE WHEN (t3._recordkind = '0'::numeric) THEN '0'::numeric ELSE t3._fld3011 END)))) <> '0'::numeric)))
  • rows=0 loops=1)
2. 0.001 299.929 ↓ 0.0 0 1

Nested Loop Left Join (cost=61,407.02..72,611.83 rows=1,510 width=194) (actual time=299.929..299.929 rows=0 loops=1)

3. 0.001 299.928 ↓ 0.0 0 1

Hash Left Join (cost=61,406.61..63,742.98 rows=1,510 width=188) (actual time=299.928..299.928 rows=0 loops=1)

  • Hash Cond: (t1.fld3006rref = t7._idrref)
4. 0.000 299.927 ↓ 0.0 0 1

Hash Left Join (cost=61,404.54..63,736.86 rows=1,510 width=172) (actual time=299.927..299.927 rows=0 loops=1)

  • Hash Cond: (t5._fld738rref = t6._idrref)
5. 0.000 299.927 ↓ 0.0 0 1

Hash Left Join (cost=61,402.36..63,730.23 rows=1,510 width=156) (actual time=299.927..299.927 rows=0 loops=1)

  • Hash Cond: (t4._fld784rref = t5._idrref)
6. 0.003 299.927 ↓ 0.0 0 1

Merge Right Join (cost=61,397.59..63,721.02 rows=1,510 width=143) (actual time=299.927..299.927 rows=0 loops=1)

  • Merge Cond: (t4._idrref = t1.fld3001rref)
7. 163.204 163.204 ↑ 18,529.0 1 1

Index Scan using _reference85_pkey on _reference85 t4 (cost=0.29..2,254.74 rows=18,529 width=45) (actual time=163.204..163.204 rows=1 loops=1)

8. 0.024 136.720 ↓ 0.0 0 1

Sort (cost=61,397.31..61,401.08 rows=1,510 width=115) (actual time=136.720..136.720 rows=0 loops=1)

  • Sort Key: t1.fld3001rref
  • Sort Method: quicksort Memory: 25kB
9. 0.001 136.696 ↓ 0.0 0 1

Subquery Scan on t1 (cost=61,260.95..61,317.58 rows=1,510 width=115) (actual time=136.696..136.696 rows=0 loops=1)

10. 0.007 136.695 ↓ 0.0 0 1

HashAggregate (cost=61,260.95..61,302.48 rows=1,510 width=179) (actual time=136.695..136.695 rows=0 loops=1)

  • Group Key: t3._fld3001rref, t3._fld3006rref, t3._fld3007rref
  • Filter: ((sum((((sum('0'::numeric)) + (sum(CASE WHEN (t3._recordkind = '0'::numeric) THEN t3._fld3011 ELSE '0'::numeric END))) - (sum(CASE WHEN (t3._recordkind = '0'::numeric) THEN '0'::numeric ELSE t3._fld3011 END)))) <> '0'::numeric) AND ((sum((sum(CASE WHEN (t3._recordkind = '0'::numeric)THEN t3._fld3011 ELSE '0'::numeric END))) <> '0'::numeric) OR (sum((sum(CASE WHEN (t3._recordkind = '0'::numeric) THEN '0'::numeric ELSE t3._fld3011 END))) <> '0'::numeric)
11. 136.688 136.688 ↓ 0.0 0 1

HashAggregate (cost=60,128.08..60,505.70 rows=15,105 width=147) (actual time=136.688..136.688 rows=0 loops=1)

  • Group Key: t3._fld3001rref, t3._fld3006rref, t3._fld3007rref
  • Filter: ((sum('0'::numeric) <> '0'::numeric) OR (sum(CASE WHEN (t3._recordkind = '0'::numeric) THEN t3._fld3011 ELSE '0'::numeric END) <> '0'::numeric) OR (sum(CASE WHEN (t3._recordkind = '0'::numeric) THEN '0'::numeric ELSE t3._fld3011 END) <> '0'::numeric))
  • -> Bitmap Heap Scan on _accumrg3000 t3 (cost=955.62..59636.84 rows=15,115 width=60) (actual time=136.596..136.596rows=0 loops=1)
  • Recheck Cond: ((_fld3007rref = '\x5c3230305c3331305c3031345c3330347a5c323136715c3330335c3032315c333437375c3033325c3235365c3334306972'::bytea) AND (_period <= '3999-12-31 00:00:00'::timestamp without time zone))
  • Filter: _active
  • -> Bitmap Index Scan on _accumrg3000_9 (cost=0.00..951.84 rows=15,115 width=0) (actual time=136.587..136.587
  • Index Cond: ((_fld3007rref = '\x5c3230305c3331305c3031345c3330347a5c323136715c3330335c3032315c333437375c3033325c3235365c3334306972'::bytea) AND (_period <= '3999-12-31 00:00:00'::timestamp without time zone))
12. 0.000 0.000 ↓ 0.0 0

Hash (cost=4.34..4.34 rows=34 width=64) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Seq Scan on _reference80 t5 (cost=0.00..4.34 rows=34 width=64) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Hash (cost=2.08..2.08 rows=8 width=48) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Seq Scan on _enum144 t6 (cost=0.00..2.08 rows=8 width=48) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Hash (cost=2.03..2.03 rows=3 width=48) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Seq Scan on _enum145 t7 (cost=0.00..2.03 rows=3 width=48) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Index Scan using _reference47ng_pkey on _reference47 t8 (cost=0.42..5.87 rows=1 width=23) (never executed)

  • Index Cond: (t1.fld3007rref = _idrref)
Planning time : 1.401 ms
Execution time : 301.115 ms