explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nlbq

Settings
# exclusive inclusive rows x rows loops node
1. 0.026 451,168.978 ↑ 1.0 100 1

Limit (cost=2,309.32..11,497.49 rows=100 width=8) (actual time=445,946.691..451,168.978 rows=100 loops=1)

2. 148.709 451,168.952 ↑ 28.6 100 1

Gather (cost=2,309.32..264,907.00 rows=2,858 width=8) (actual time=445,946.690..451,168.952 rows=100 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 12.598 451,020.243 ↑ 35.0 34 3 / 3

Nested Loop Left Join (cost=1,309.32..263,621.20 rows=1,191 width=8) (actual time=446,245.890..451,020.243 rows=34 loops=3)

  • Filter: ((detection_details.order_id IS NULL) OR (detection_details.status = 0))
  • Rows Removed by Filter: 4295
4. 15,643.341 15,887.998 ↑ 1.4 4,329 3 / 3

Parallel Bitmap Heap Scan on orders (cost=1,308.89..117,015.68 rows=6,223 width=8) (actual time=653.185..15,887.998 rows=4,329 loops=3)

  • Recheck Cond: (court_id = 2)
  • Filter: (ocr_status = 1)
  • Rows Removed by Filter: 158
  • Heap Blocks: exact=1957
5. 244.657 244.657 ↓ 1.0 38,977 1 / 3

Bitmap Index Scan on index_orders_on_court_id_and_date (cost=0.00..1,305.15 rows=37,963 width=0) (actual time=733.972..733.972 rows=38,977 loops=1)

  • Index Cond: (court_id = 2)
6. 435,119.647 435,119.647 ↑ 1.0 1 12,988 / 3

Index Scan using index_detection_details_on_order_id on detection_details (cost=0.43..23.55 rows=1 width=12) (actual time=38.662..100.505 rows=1 loops=12,988)

  • Index Cond: (orders.id = order_id)
  • Filter: ((detection_type)::text = 'unique_id'::text)