explain.depesz.com

PostgreSQL's explain analyze made readable

Result: D1aC

Settings
# exclusive inclusive rows x rows loops node
1. 306.353 45,008.398 ↑ 1.0 1 1

Aggregate (cost=1,854,081.12..1,854,081.13 rows=1 width=0) (actual time=45,008.398..45,008.398 rows=1 loops=1)

2. 669.167 44,702.045 ↓ 1.0 755,407 1

Hash Join (cost=1,788,272.48..1,852,196.40 rows=753,891 width=0) (actual time=42,013.977..44,702.045 rows=755,407 loops=1)

  • Hash Cond: (mcti.sty_id = sty.sty_id)
3. 1,607.575 44,032.865 ↓ 1.0 755,407 1

Hash Left Join (cost=1,788,271.37..1,841,829.28 rows=753,891 width=2) (actual time=42,013.952..44,032.865 rows=755,407 loops=1)

  • Hash Cond: (mcti.mcti_id = mto.mcti_id)
4. 411.432 411.432 ↓ 1.0 755,407 1

Seq Scan on t_monitoringcontactinfos_mcti mcti (cost=0.00..32,823.91 rows=753,891 width=6) (actual time=0.006..411.432 rows=755,407 loops=1)

5. 402.842 42,013.858 ↓ 3,775.3 755,057 1

Hash (cost=1,788,268.87..1,788,268.87 rows=200 width=4) (actual time=42,013.858..42,013.858 rows=755,057 loops=1)

  • Buckets: 1024 Batches: 32 (originally 1) Memory Usage: 1025kB
6. 4,870.979 41,611.016 ↓ 3,775.3 755,057 1

HashAggregate (cost=1,788,264.87..1,788,266.87 rows=200 width=4) (actual time=41,039.507..41,611.016 rows=755,057 loops=1)

7. 5,862.863 36,740.037 ↓ 1.0 4,932,358 1

Unique (cost=1,482,393.43..1,727,090.58 rows=4,893,943 width=64) (actual time=27,519.770..36,740.037 rows=4,932,358 loops=1)

8. 14,563.297 30,877.174 ↓ 1.0 4,932,358 1

Sort (cost=1,482,393.43..1,494,628.29 rows=4,893,943 width=64) (actual time=27,519.768..30,877.174 rows=4,932,358 loops=1)

  • Sort Key: mto.mto_id, mto.mtr_externalcode, mto.mcti_id, mto.act_id, mto.mch_id, ('od'::text), mto.mtr_startdate, mto.mtr_enddate, mto.mtr_begintimeslotboundary, mto.mtr_endtimeslotboundary, (CASE WHEN (substr((mto.mtr_validitypatterndays)::text, 1, 1) = '1'::text) THEN true ELSE false END), (CASE WHEN (substr((mto.mtr_validitypatterndays)::text, 2, 1) = '1'::text) THEN true ELSE false END), (CASE WHEN (substr((mto.mtr_validitypatterndays)::text, 3, 1) = '1'::text) THEN true ELSE false END), (CASE WHEN (substr((mto.mtr_validitypatterndays)::text, 4, 1) = '1'::text) THEN true ELSE false END), (CASE WHEN (substr((mto.mtr_validitypatterndays)::text, 5, 1) = '1'::text) THEN true ELSE false END), (CASE WHEN (substr((mto.mtr_validitypatterndays)::text, 6, 1) = '1'::text) THEN true ELSE false END), (CASE WHEN (substr((mto.mtr_validitypatterndays)::text, 7, 1) = '1'::text) THEN true ELSE false END), (CASE WHEN (substr((mto.mtr_validitypatterndays)::text, 8, 1) = '1'::text) THEN true ELSE false END), mto.mtr_state
  • Sort Method: external merge Disk: 426048kB
9. 3,992.480 16,313.877 ↓ 1.0 4,932,358 1

Append (cost=0.00..386,607.58 rows=4,893,943 width=64) (actual time=0.015..16,313.877 rows=4,932,358 loops=1)

10. 12,315.265 12,315.265 ↓ 1.0 4,929,916 1

Seq Scan on tr_monitoringod_mto mto (cost=0.00..337,442.05 rows=4,891,501 width=64) (actual time=0.014..12,315.265 rows=4,929,916 loops=1)

11. 6.132 6.132 ↑ 1.0 2,442 1

Seq Scan on tr_monitoringstation_mts mts (cost=0.00..226.10 rows=2,442 width=92) (actual time=0.032..6.132 rows=2,442 loops=1)

12. 0.008 0.013 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=2) (actual time=0.013..0.013 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
13. 0.005 0.005 ↑ 1.0 5 1

Seq Scan on tr_subscribertype_sty sty (cost=0.00..1.05 rows=5 width=2) (actual time=0.004..0.005 rows=5 loops=1)