explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G4HR

Settings
# exclusive inclusive rows x rows loops node
1. 0.787 4,566.055 ↑ 1.0 30 1

Limit (cost=17,833.67..17,833.74 rows=30 width=2,204) (actual time=4,565.025..4,566.055 rows=30 loops=1)

2. 1.826 4,565.268 ↑ 56.0 30 1

Sort (cost=17,833.67..17,837.87 rows=1,680 width=2,204) (actual time=4,565.005..4,565.268 rows=30 loops=1)

  • Sort Key: cts.inserted_at, cts.case_id
  • Sort Method: top-N heapsort Memory: 29kB
3. 2,187.009 4,563.442 ↑ 18.3 92 1

Hash Join (cost=10,928.92..17,784.05 rows=1,680 width=2,204) (actual time=313.595..4,563.442 rows=92 loops=1)

  • Hash Cond: (c.id = cts.case_id)
4. 2,132.415 2,132.415 ↑ 1.0 203,659 1

Seq Scan on cases c (cost=0.00..6,071.06 rows=204,606 width=16) (actual time=0.024..2,132.415 rows=203,659 loops=1)

5. 1.044 244.018 ↑ 18.3 92 1

Hash (cost=10,907.92..10,907.92 rows=1,680 width=2,204) (actual time=244.002..244.018 rows=92 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 32kB
6. 242.974 242.974 ↑ 18.3 92 1

Seq Scan on case_tsv_searches_columns cts (cost=0.00..10,907.92 rows=1,680 width=2,204) (actual time=14.203..242.974 rows=92 loops=1)

  • Filter: ((status = ANY ('{new,dispatch,dispatched,en_route,arrived,rolling,canceled,closed,closed_canceled}'::case_status[])) AND (((case_number)::text ~~ '%4848'::text) OR ((unit_numbers)::text ~~ ANY ('{%4848%}'::text[])) OR (case_tsv @@ '''4848'':*'::tsquery)))
  • Rows Removed by Filter: 203,567
Planning time : 1.749 ms
Execution time : 4,568.202 ms