explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iWtF

Settings
# exclusive inclusive rows x rows loops node
1. 0.054 140.413 ↑ 1.0 1 1

Sort (cost=18,708.12..18,708.12 rows=1 width=168) (actual time=140.412..140.413 rows=1 loops=1)

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

Nested Loop (cost=257.82..18,708.11 rows=1 width=168) (actual time=138.100..140.359 rows=1 loops=1)

3. 124.339 140.113 ↑ 1.0 1 1

Bitmap Heap Scan on main_order (cost=257.54..18,705.60 rows=1 width=215) (actual time=137.855..140.113 rows=1 loops=1)

  • Recheck Cond: (((operator_id IS NULL) AND (operator_id IS NULL)) OR ((operator_id = 50) 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 = 50)) AND (((datetime_action >= '2020-02-03 18:01:50.09299+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-24 18:01:50.09299+03'::timestamp with time zone)) OR (status = ANY ('{17,19}'::integer[]))))
  • Rows Removed by Filter: 104487
  • Heap Blocks: exact=45321
4. 0.002 15.774 ↓ 0.0 0 1

BitmapOr (cost=257.54..257.54 rows=18,848 width=0) (actual time=15.774..15.774 rows=0 loops=1)

5. 15.771 15.771 ↓ 6.2 104,488 1

Bitmap Index Scan on main_order_operator_id_4e9ecae4 (cost=0.00..229.66 rows=16,873 width=0) (actual time=15.771..15.771 rows=104,488 loops=1)

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

Bitmap Index Scan on main_order_operator_id_4e9ecae4 (cost=0.00..27.89 rows=1,976 width=0) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: ((operator_id = 50) AND (operator_id IS NULL))
7. 0.034 0.034 ↑ 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.034..0.034 rows=1 loops=1)

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