explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8hKU

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 9,567.315 ↓ 0.0 0 1

Limit (cost=4,740.95..4,740.95 rows=3 width=253) (actual time=9,567.315..9,567.315 rows=0 loops=1)

2. 0.041 9,567.314 ↓ 0.0 0 1

Sort (cost=4,740.95..4,740.95 rows=3 width=253) (actual time=9,567.314..9,567.314 rows=0 loops=1)

  • Sort Key: order0_.created_date DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.002 9,567.273 ↓ 0.0 0 1

Nested Loop (cost=196.61..4,740.92 rows=3 width=253) (actual time=9,567.273..9,567.273 rows=0 loops=1)

  • Join Filter: (order0_.origin_id = origin1_.id)
4. 1.105 9,567.271 ↓ 0.0 0 1

Hash Join (cost=196.04..3,362.43 rows=419 width=261) (actual time=9,567.271..9,567.271 rows=0 loops=1)

  • Hash Cond: (subsets2_.subset_id = subset3_.id)
5. 3.934 9,565.585 ↓ 1.8 4,511 1

Nested Loop (cost=1.13..3,160.50 rows=2,520 width=269) (actual time=5.018..9,565.585 rows=4,511 loops=1)

6. 9,358.725 9,358.725 ↓ 1.7 1,091 1

Index Scan using order_delivery_order_state_created_date_idx on order_delivery order0_ (cost=0.70..1,014.29 rows=658 width=253) (actual time=4.520..9,358.725 rows=1,091 loops=1)

  • Index Cond: (((order_state)::text = ANY ('{ALLOCATION_FAILED,ALLOCATING,DELIVERY_ACCEPTED,PENDING,CONFIRMED}'::text[])) AND (created_date >= '2020-09-08 02:00:00'::timestamp without time zone) AND (created_date <= '2020-09-09 01:59:05'::timestamp without time zone))
7. 202.926 202.926 ↑ 1.0 4 1,091

Index Only Scan using locality_subset_pkey on locality_subset subsets2_ (cost=0.43..2.86 rows=4 width=16) (actual time=0.150..0.186 rows=4 loops=1,091)

  • Index Cond: (locality_id = order0_.origin_id)
  • Heap Fetches: 562
8. 0.017 0.581 ↑ 1.0 105 1

Hash (cost=184.15..184.15 rows=105 width=8) (actual time=0.581..0.581 rows=105 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
9. 0.564 0.564 ↑ 1.0 105 1

Seq Scan on subset subset3_ (cost=0.00..184.15 rows=105 width=8) (actual time=0.024..0.564 rows=105 loops=1)

  • Filter: (id = ANY ('{1545,1546,1547,1548,1549,1550,1551,24,25,26,27,28,29,30,33,50,1090,1094,81,82,83,84,85,86,88,1148,1166,1424,1439,1440,1188,1445,1449,1451,1452,1453,1454,1455,1456,1457,1460,1463,1464,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1484,1485,1486,1487,1488,1489,1490,1491,1492,1237,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1246,1247,1503,1504,1505,1506,1251,1507,1508,1509,1510,1511,1512,1513,1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1532}'::bigint[]))
  • Rows Removed by Filter: 386
10. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_locality on locality origin1_ (cost=0.57..3.19 rows=1 width=8) (never executed)

  • Index Cond: (id = subsets2_.locality_id)
  • Heap Fetches: 0
Planning time : 5.959 ms
Execution time : 9,567.444 ms