explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jTR

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 59.921 ↓ 1.3 8 1

Limit (cost=19,456.78..19,457.48 rows=6 width=974) (actual time=59.918..59.921 rows=8 loops=1)

2. 4.525 61.122 ↓ 1.3 8 1

Gather Merge (cost=19,456.78..19,457.48 rows=6 width=974) (actual time=59.916..61.122 rows=8 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.036 56.597 ↑ 1.0 3 3 / 3

Sort (cost=18,456.76..18,456.76 rows=3 width=974) (actual time=56.596..56.597 rows=3 loops=3)

  • Sort Key: order0_.entity_created DESC
  • Sort Method: quicksort Memory: 26kB
  • Worker 0: Sort Method: quicksort Memory: 28kB
  • Worker 1: Sort Method: quicksort Memory: 28kB
4. 0.011 56.561 ↑ 1.0 3 3 / 3

Nested Loop (cost=1.11..18,456.73 rows=3 width=974) (actual time=15.034..56.561 rows=3 loops=3)

5. 0.009 56.526 ↑ 1.0 3 3 / 3

Nested Loop Left Join (cost=0.84..18,455.77 rows=3 width=974) (actual time=15.015..56.526 rows=3 loops=3)

6. 0.016 56.482 ↑ 1.0 3 3 / 3

Nested Loop (cost=0.42..18,453.92 rows=3 width=721) (actual time=14.992..56.482 rows=3 loops=3)

7. 56.316 56.316 ↑ 2.1 8 3 / 3

Parallel Seq Scan on customer_snapshots customersn2_ (cost=0.00..18,309.78 rows=17 width=37) (actual time=7.484..56.316 rows=8 loops=3)

  • Filter: ((phone_number IS NOT NULL) AND ((phone_number)::text ~~ '%562732125%'::text))
  • Rows Removed by Filter: 236,394
8. 0.150 0.150 ↓ 0.0 0 25 / 3

Index Scan using idx_17741_idx_orders_customer_snapshot_id on orders order0_ (cost=0.42..8.47 rows=1 width=721) (actual time=0.018..0.018 rows=0 loops=25)

  • Index Cond: ((customer_snapshot_id)::text = (customersn2_.id)::text)
  • Filter: ((accepted_date_time >= '2020-06-30 20:00:00+00'::timestamp with time zone) AND (accepted_date_time <= '2020-08-05 19:59:59+00'::timestamp with time zone) AND ((((status)::text = 'DISPATCHED'::text) AND (((type)::text = 'DINE_IN'::text) OR ((type)::text = 'TAKE_AWAY'::text) OR (((type)::text = 'DELIVERY'::text) AND (((delivery_type)::text = 'PARTNER_DELIVERY'::text) OR ((delivery_type)::text = 'DEFAULT'::text))))) OR ((status)::text = ANY ('{DELIVERED,PREPARED,ACCEPTED,CLOSED,CANCELLED}'::text[]))))
  • Rows Removed by Filter: 1
9. 0.035 0.035 ↓ 0.0 0 8 / 3

Index Scan using idx_17696_fk_order_deliveries_orders on order_deliveries orderdeliv4_ (cost=0.42..0.61 rows=1 width=253) (actual time=0.013..0.013 rows=0 loops=8)

  • Index Cond: ((order0_.id)::text = (order_id)::text)
10. 0.024 0.024 ↑ 1.0 1 8 / 3

Index Scan using idx_17426_primary on extract_point_of_sales pointofsal1_ (cost=0.27..0.31 rows=1 width=55) (actual time=0.009..0.009 rows=1 loops=8)

  • Index Cond: ((id)::text = (order0_.point_of_sale_id)::text)
  • Filter: ((((order0_.status)::text = 'DISPATCHED'::text) AND (((order0_.type)::text = 'DINE_IN'::text) OR ((order0_.type)::text = 'TAKE_AWAY'::text) OR (((order0_.type)::text = 'DELIVERY'::text) AND (((order0_.delivery_type)::text = 'PARTNER_DELIVERY'::text) OR (((order0_.delivery_type)::text = 'DEFAULT'::text) AND ((delivery_provider_type)::text = 'PARTNER_DELIVERY'::text)))))) OR ((order0_.status)::text = ANY ('{DELIVERED,PREPARED,ACCEPTED,CLOSED,CANCELLED}'::text[])))
Planning time : 1.420 ms
Execution time : 61.277 ms