explain.depesz.com

PostgreSQL's explain analyze made readable

Result: J6Pc

Settings
# exclusive inclusive rows x rows loops node
1. 111.750 6,959.408 ↑ 3,807.1 50 1

GroupAggregate (cost=1,968,690.60..1,974,877.13 rows=190,355 width=79) (actual time=6,679.907..6,959.408 rows=50 loops=1)

  • Group Key: (to_char(cr.create_ts, 'YYYY-MM-DD'::text)), c.short_name
2. 589.854 6,847.658 ↓ 1.0 191,013 1

Sort (cost=1,968,690.60..1,969,166.48 rows=190,355 width=288) (actual time=6,673.851..6,847.658 rows=191,013 loops=1)

  • Sort Key: (to_char(cr.create_ts, 'YYYY-MM-DD'::text)) DESC, c.short_name
  • Sort Method: external merge Disk: 52184kB
3. 334.694 6,257.804 ↓ 1.0 191,013 1

Hash Join (cost=2.51..1,926,623.05 rows=190,355 width=288) (actual time=3,898.861..6,257.804 rows=191,013 loops=1)

  • Hash Cond: (cr.own_company = c.company_id)
4. 405.434 5,923.046 ↓ 1.0 191,013 1

Nested Loop (cost=0.56..1,923,527.83 rows=190,355 width=257) (actual time=3,897.207..5,923.046 rows=191,013 loops=1)

5. 4,562.547 4,562.547 ↑ 1.0 191,013 1

Seq Scan on common_request cr (cost=0.00..781,662.77 rows=191,473 width=191) (actual time=3,897.182..4,562.547 rows=191,013 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. 955.065 955.065 ↑ 1.0 1 191,013

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=191,013)

  • Index Cond: (timeuuid = cr.timeuuid)
7. 0.042 0.064 ↑ 1.0 42 1

Hash (cost=1.42..1.42 rows=42 width=39) (actual time=0.063..0.064 rows=42 loops=1)

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

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

Planning time : 0.545 ms
Execution time : 6,971.075 ms