explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Wxr6

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 102.166 ↑ 1.0 1 1

Sort (cost=16,899.27..16,899.28 rows=1 width=168) (actual time=102.165..102.166 rows=1 loops=1)

  • Sort Key: main_order.datetime_create
  • Sort Method: quicksort Memory: 25kB
2. 0.074 102.150 ↑ 1.0 1 1

Nested Loop (cost=229.54..16,899.26 rows=1 width=168) (actual time=100.887..102.150 rows=1 loops=1)

3. 85.014 102.049 ↑ 1.0 1 1

Bitmap Heap Scan on main_order (cost=229.26..16,896.75 rows=1 width=211) (actual time=100.786..102.049 rows=1 loops=1)

  • Recheck Cond: (((operator_id IS NULL) AND (operator_id IS NULL)) OR ((operator_id = 263) AND (operator_id IS NULL)))
  • Filter: ((id >= 606619) AND (status <> 0) AND (status = 1) AND (((operator_id IS NULL) AND (status = ANY ('{1,23,30,37,39}'::integer[]))) OR (operator_id = 263)) AND (((datetime_action >= '2020-02-05 09:56:22.56822+03'::timestamp with time zone) AND (status = ANY ('{10,11,16,23,25}'::integer[]))) OR ((status <> ALL ('{10,11,16,23,25}'::integer[])) AND (datetime_action >= '2019-12-26 09:56:22.56822+03'::timestamp with time zone)) OR (status = ANY ('{17,19}'::integer[]))))
  • Rows Removed by Filter: 105225
  • Heap Blocks: exact=45764
4. 0.002 17.035 ↓ 0.0 0 1

BitmapOr (cost=229.26..229.26 rows=16,791 width=0) (actual time=17.035..17.035 rows=0 loops=1)

5. 17.031 17.031 ↓ 6.3 105,226 1

Bitmap Index Scan on main_order_operator_id_4e9ecae4 (cost=0.00..226.47 rows=16,664 width=0) (actual time=17.031..17.031 rows=105,226 loops=1)

  • Index Cond: ((operator_id IS NULL) AND (operator_id IS NULL))
6. 0.002 0.002 ↓ 0.0 0 1

Bitmap Index Scan on main_order_operator_id_4e9ecae4 (cost=0.00..2.79 rows=127 width=0) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: ((operator_id = 263) AND (operator_id IS NULL))
7. 0.027 0.027 ↑ 1.0 1 1

Index Scan using main_site_pkey on main_site (cost=0.28..2.49 rows=1 width=4) (actual time=0.027..0.027 rows=1 loops=1)

  • Index Cond: (id = main_order.site_id)
  • Filter: is_active
Planning time : 0.699 ms
Execution time : 102.313 ms