explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GcQr

Settings
# exclusive inclusive rows x rows loops node
1. 1.088 53.876 ↓ 21.1 1,285 1

Sort (cost=8,510.59..8,510.74 rows=61 width=322) (actual time=53.724..53.876 rows=1,285 loops=1)

  • Sort Key: ((subordertable.time_stamp + '05:30:00'::interval)) DESC
  • Sort Method: quicksort Memory: 693kB
2. 1.667 52.788 ↓ 21.1 1,285 1

Nested Loop Left Join (cost=11.81..8,508.78 rows=61 width=322) (actual time=0.189..52.788 rows=1,285 loops=1)

3. 0.377 47.266 ↓ 21.1 1,285 1

Nested Loop Left Join (cost=11.25..7,984.46 rows=61 width=282) (actual time=0.176..47.266 rows=1,285 loops=1)

4. 1.003 44.319 ↓ 21.1 1,285 1

Nested Loop Left Join (cost=10.82..7,469.01 rows=61 width=286) (actual time=0.169..44.319 rows=1,285 loops=1)

5. 0.937 42.031 ↓ 21.1 1,285 1

Nested Loop Left Join (cost=10.39..7,054.93 rows=61 width=286) (actual time=0.162..42.031 rows=1,285 loops=1)

6. 0.310 26.959 ↓ 21.1 1,285 1

Nested Loop (cost=3.59..6,954.88 rows=61 width=254) (actual time=0.132..26.959 rows=1,285 loops=1)

  • Join Filter: (subordertable.suborderid = subordertablewithouttax.suborderid)
7. 1.026 22.794 ↓ 20.1 1,285 1

Nested Loop Left Join (cost=3.16..6,519.57 rows=64 width=243) (actual time=0.123..22.794 rows=1,285 loops=1)

8. 0.237 20.483 ↓ 20.1 1,285 1

Nested Loop (cost=2.73..6,085.64 rows=64 width=237) (actual time=0.116..20.483 rows=1,285 loops=1)

9. 0.009 0.009 ↑ 1.0 1 1

Index Scan using storegstdetailstable_pkey on storegstdetailstable (cost=0.43..8.45 rows=1 width=24) (actual time=0.008..0.009 rows=1 loops=1)

  • Index Cond: (storeid = 2,371,830)
10. 0.836 20.237 ↓ 20.1 1,285 1

Nested Loop (cost=2.29..6,076.55 rows=64 width=221) (actual time=0.106..20.237 rows=1,285 loops=1)

11. 0.074 16.831 ↓ 20.1 1,285 1

Nested Loop Left Join (cost=1.86..5,642.03 rows=64 width=207) (actual time=0.099..16.831 rows=1,285 loops=1)

12. 0.165 14.187 ↓ 20.1 1,285 1

Nested Loop (cost=1.44..5,103.96 rows=64 width=180) (actual time=0.092..14.187 rows=1,285 loops=1)

13. 0.819 10.167 ↓ 20.1 1,285 1

Nested Loop (cost=0.86..4,554.36 rows=64 width=147) (actual time=0.085..10.167 rows=1,285 loops=1)

  • Join Filter: (subordertable.suborderstatusvalue = convertortable.suborderstatusvalue)
  • Rows Removed by Join Filter: 14,135
14. 0.324 8.063 ↓ 20.1 1,285 1

Nested Loop (cost=0.86..4,541.69 rows=64 width=123) (actual time=0.076..8.063 rows=1,285 loops=1)

15. 3.884 3.884 ↓ 12.1 1,285 1

Index Scan using idx_parentstoreid_subordertable on subordertable (cost=0.43..3,644.93 rows=106 width=81) (actual time=0.060..3.884 rows=1,285 loops=1)

  • Index Cond: (parentstoreid = 2,371,830)
  • Filter: ((date((time_stamp + '05:30:00'::interval)) >= '2019-12-01'::date) AND (date((time_stamp + '05:30:00'::interval)) <= '2019-12-31'::date) AND (suborderstatusvalue = ANY ('{3,4,5,6,7,8,9,10,11,12}'::bigint[])))
  • Rows Removed by Filter: 1,910
16. 3.855 3.855 ↑ 1.0 1 1,285

Index Scan using idx_suborderid_subordertableforresellers on subordertableforresellers (cost=0.43..8.45 rows=1 width=42) (actual time=0.003..0.003 rows=1 loops=1,285)

  • Index Cond: (suborderid = subordertable.suborderid)
17. 1.279 1.285 ↑ 1.0 12 1,285

Materialize (cost=0.00..1.18 rows=12 width=36) (actual time=0.000..0.001 rows=12 loops=1,285)

18. 0.006 0.006 ↑ 1.0 12 1

Seq Scan on convertortable (cost=0.00..1.12 rows=12 width=36) (actual time=0.005..0.006 rows=12 loops=1)

19. 3.855 3.855 ↑ 1.0 1 1,285

Index Scan using producttable_pkey on producttable (cost=0.57..8.59 rows=1 width=41) (actual time=0.003..0.003 rows=1 loops=1,285)

  • Index Cond: (productid = subordertable.productid)
20. 2.570 2.570 ↓ 0.0 0 1,285

Index Scan using subordermetadetails_pkey on subordermetadetails (cost=0.43..8.41 rows=1 width=35) (actual time=0.002..0.002 rows=0 loops=1,285)

  • Index Cond: (subordertable.suborderid = suborderid)
21. 2.570 2.570 ↑ 1.0 1 1,285

Index Scan using storetable_pkey on storetable (cost=0.43..6.79 rows=1 width=22) (actual time=0.002..0.002 rows=1 loops=1,285)

  • Index Cond: (storeid = subordertableforresellers.resellerid)
22. 1.285 1.285 ↑ 1.0 1 1,285

Index Scan using productskudetails_productvariantid_unique on productskudetails (cost=0.43..6.78 rows=1 width=22) (actual time=0.001..0.001 rows=1 loops=1,285)

  • Index Cond: (productvariantid = subordertableforresellers.productvariantid)
23. 3.855 3.855 ↑ 1.0 1 1,285

Index Scan using subordertablewithouttax_pkey on subordertablewithouttax (cost=0.43..6.79 rows=1 width=27) (actual time=0.003..0.003 rows=1 loops=1,285)

  • Index Cond: (suborderid = subordertableforresellers.suborderid)
24. 7.710 14.135 ↑ 1.0 1 1,285

Hash Right Join (cost=6.80..8.32 rows=1 width=48) (actual time=0.007..0.011 rows=1 loops=1,285)

  • Hash Cond: (statecodemappingtable.id = rs.sellingstateid)
25. 2.570 2.570 ↑ 1.0 37 1,285

Seq Scan on statecodemappingtable (cost=0.00..1.37 rows=37 width=40) (actual time=0.000..0.002 rows=37 loops=1,285)

26. 1.285 3.855 ↑ 1.0 1 1,285

Hash (cost=6.79..6.79 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=1,285)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
27. 2.570 2.570 ↑ 1.0 1 1,285

Index Scan using storesellingstates_pkey on storesellingstates rs (cost=0.43..6.79 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=1,285)

  • Index Cond: (storeid = subordertableforresellers.resellerid)
28. 1.285 1.285 ↑ 1.0 1 1,285

Index Scan using storesellingstates_pkey on storesellingstates ws (cost=0.43..6.79 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=1,285)

  • Index Cond: (storeid = subordertableforresellers.wholesellerid)
29. 2.570 2.570 ↑ 1.0 1 1,285

Index Scan using shipmenttable_pkey on shipmenttable (cost=0.43..8.45 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=1,285)

  • Index Cond: (subordertable.subordershipmentid = shipmentid)
30. 3.855 3.855 ↑ 1.0 1 1,285

Index Scan using idx_soid_store_subordersellergstdetailstable on subordersellergstdetailstable ssg (cost=0.56..8.58 rows=1 width=31) (actual time=0.003..0.003 rows=1 loops=1,285)

  • Index Cond: ((suborderid = subordertable.suborderid) AND (subordertable.parentstoreid = storeid) AND (storeid = 2,371,830))
Planning time : 5.007 ms
Execution time : 54.053 ms