explain.depesz.com

PostgreSQL's explain analyze made readable

Result: od9

Settings
# exclusive inclusive rows x rows loops node
1. 108.116 6,493.305 ↑ 3,807.0 50 1

GroupAggregate (cost=1,966,718.28..1,972,904.72 rows=190,352 width=55) (actual time=6,245.944..6,493.305 rows=50 loops=1)

  • Group Key: (date_trunc('day'::text, cr.create_ts)), c.short_name
2. 497.616 6,385.189 ↓ 1.0 190,845 1

Sort (cost=1,966,718.28..1,967,194.16 rows=190,352 width=264) (actual time=6,240.636..6,385.189 rows=190,845 loops=1)

  • Sort Key: (date_trunc('day'::text, cr.create_ts)) DESC, c.short_name
  • Sort Method: external merge Disk: 51552kB
3. 225.897 5,887.573 ↓ 1.0 190,845 1

Hash Join (cost=2.51..1,926,600.51 rows=190,352 width=264) (actual time=3,661.167..5,887.573 rows=190,845 loops=1)

  • Hash Cond: (cr.own_company = c.company_id)
4. 394.354 5,661.620 ↓ 1.0 190,845 1

Nested Loop (cost=0.56..1,923,505.35 rows=190,352 width=257) (actual time=3,661.093..5,661.620 rows=190,845 loops=1)

5. 4,313.041 4,313.041 ↑ 1.0 190,845 1

Seq Scan on common_request cr (cost=0.00..781,653.46 rows=191,471 width=191) (actual time=3,661.057..4,313.041 rows=190,845 loops=1)

  • Filter: ((create_ts > '2019-08-07 00:00:00'::timestamp without time zone) AND (create_ts <= '2019-08-10 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 23920200
6. 954.225 954.225 ↑ 1.0 1 190,845

Index Scan using pk_message_status on message_status ms (cost=0.56..5.95 rows=1 width=98) (actual time=0.005..0.005 rows=1 loops=190,845)

  • Index Cond: (timeuuid = cr.timeuuid)
7. 0.014 0.056 ↑ 1.0 42 1

Hash (cost=1.42..1.42 rows=42 width=39) (actual time=0.055..0.056 rows=42 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
8. 0.042 0.042 ↑ 1.0 42 1

Seq Scan on insurance_company c (cost=0.00..1.42 rows=42 width=39) (actual time=0.009..0.042 rows=42 loops=1)

Planning time : 0.524 ms
Execution time : 6,505.151 ms