explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0qhpD

Settings
# exclusive inclusive rows x rows loops node
1. 8.899 358.607 ↓ 4,652.0 4,652 1

Nested Loop Left Join (cost=2,658.43..2,674.85 rows=1 width=1,380) (actual time=52.922..358.607 rows=4,652 loops=1)

2. 5.543 312.492 ↓ 4,652.0 4,652 1

Nested Loop Left Join (cost=2,650.76..2,664.49 rows=1 width=1,394) (actual time=52.888..312.492 rows=4,652 loops=1)

3. 4.341 251.125 ↓ 4,652.0 4,652 1

Nested Loop Left Join (cost=2,642.22..2,655.92 rows=1 width=1,314) (actual time=52.845..251.125 rows=4,652 loops=1)

4. 5.526 186.308 ↓ 4,652.0 4,652 1

Nested Loop Left Join (cost=2,633.69..2,647.35 rows=1 width=1,218) (actual time=52.796..186.308 rows=4,652 loops=1)

5. 4.414 152.870 ↓ 4,652.0 4,652 1

Nested Loop Left Join (cost=2,627.65..2,641.29 rows=1 width=1,171) (actual time=52.775..152.870 rows=4,652 loops=1)

6. 3.745 143.804 ↓ 4,652.0 4,652 1

Nested Loop (cost=2,627.38..2,640.97 rows=1 width=1,083) (actual time=52.771..143.804 rows=4,652 loops=1)

7. 1.457 126.103 ↓ 4,652.0 4,652 1

Nested Loop Left Join (cost=2,626.96..2,639.28 rows=1 width=1,067) (actual time=52.763..126.103 rows=4,652 loops=1)

8. 1.920 115.342 ↓ 4,652.0 4,652 1

Nested Loop Left Join (cost=2,626.68..2,636.74 rows=1 width=1,076) (actual time=52.757..115.342 rows=4,652 loops=1)

9. 3.352 99.466 ↓ 4,652.0 4,652 1

Nested Loop (cost=2,626.26..2,634.10 rows=1 width=1,034) (actual time=52.740..99.466 rows=4,652 loops=1)

10. 12.288 82.158 ↓ 4,652.0 4,652 1

Nested Loop Left Join (cost=2,625.84..2,631.46 rows=1 width=1,002) (actual time=52.731..82.158 rows=4,652 loops=1)

  • Join Filter: (ts.id = g.taxsystem_id)
  • Rows Removed by Join Filter: 32564
11. 10.916 65.218 ↓ 4,652.0 4,652 1

Nested Loop Left Join (cost=2,625.84..2,630.30 rows=1 width=486) (actual time=52.720..65.218 rows=4,652 loops=1)

  • -> Index Scan using assortmentfavorite_consignment_id_retailstore_id__unique on assortmentfavorite featurefavorite (cost=0.27..2.49 rows=1 width=104) (actual time=0.001..0.001 rows=0 loops=465 (...)
12. 0.651 54.302 ↓ 4,652.0 4,652 1

Limit (cost=2,625.57..2,625.57 rows=1 width=398) (actual time=52.706..54.302 rows=4,652 loops=1)

  • Index Cond: ((consignment_id = defconsignment.id) AND (retailstore_id = '3425fb84-1184-11e8-9ff4-315000087f47'::uuid))
  • Filter: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
13. 8.133 53.651 ↓ 4,652.0 4,652 1

Sort (cost=2,625.57..2,625.57 rows=1 width=398) (actual time=52.704..53.651 rows=4,652 loops=1)

  • Sort Key: defconsignment.id
  • Sort Method: quicksort Memory: 2991kB
14. 7.785 45.518 ↓ 4,652.0 4,652 1

Nested Loop (cost=1,149.40..2,625.56 rows=1 width=398) (actual time=4.339..45.518 rows=4,652 loops=1)

15. 3.959 14.453 ↓ 118.8 5,820 1

Hash Join (cost=1,148.97..2,529.70 rows=49 width=72) (actual time=4.311..14.453 rows=5,820 loops=1)

  • Hash Cond: (f.id = defconsignment.feature_id)
16. 6.243 6.243 ↓ 2.0 5,820 1

Index Scan using i__feature__account_id on feature f (cost=0.42..1,369.60 rows=2,949 width=56) (actual time=0.024..6.243 rows=5,820 loops=1)

  • Index Cond: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
  • Filter: ((NOT archived) AND CASE WHEN (get_bit(B'0000000000000000000000000010100000000001000000000000000000000000000000000000000000000000000000000000000000000000000 (...)
  • Rows Removed by Filter: 2
17. 1.524 4.251 ↑ 1.0 5,822 1

Hash (cost=1,075.69..1,075.69 rows=5,829 width=32) (actual time=4.251..4.251 rows=5,822 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 428kB
18. 2.727 2.727 ↑ 1.0 5,822 1

Index Scan using i__consignment__account_id on consignment defconsignment (cost=0.42..1,075.69 rows=5,829 width=32) (actual time=0.013..2.727 rows=5,822 loops=1)

  • Index Cond: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
  • Filter: (isdefault AND (id > '00000000-0000-0000-0000-000000000000'::uuid))
19. 23.280 23.280 ↑ 1.0 1 5,820

Index Scan using good_pkey on good g (cost=0.42..1.96 rows=1 width=306) (actual time=0.004..0.004 rows=1 loops=5,820)

  • Index Cond: (id = f.parent_id)
  • Filter: ((NOT archived) AND (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid) AND ((dtype)::text = ANY ('{Good,Service,Kit}'::text[])) AND (((path)::text ~~ '/c (...)
  • Rows Removed by Filter: 0
20. 4.652 4.652 ↑ 1.0 7 4,652

Seq Scan on taxsystem ts (cost=0.00..1.07 rows=7 width=532) (actual time=0.001..0.001 rows=7 loops=4,652)

21. 13.956 13.956 ↑ 1.0 1 4,652

Index Scan using u__feature__default on feature deffeature (cost=0.42..2.64 rows=1 width=48) (actual time=0.003..0.003 rows=1 loops=4,652)

  • Index Cond: (parent_id = g.id)
  • Filter: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
22. 13.956 13.956 ↑ 1.0 1 4,652

Index Scan using good_pkey on good gf (cost=0.42..2.64 rows=1 width=74) (actual time=0.003..0.003 rows=1 loops=4,652)

  • Index Cond: (g.parent_id = id)
  • Filter: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
23. 9.304 9.304 ↑ 1.0 1 4,652

Index Scan using uom_pkey on uom (cost=0.27..2.49 rows=1 width=23) (actual time=0.002..0.002 rows=1 loops=4,652)

  • Index Cond: (id = g.uom_id)
  • Filter: ((account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid) OR (account_id IS NULL))
24. 13.956 13.956 ↑ 1.0 1 4,652

Index Scan using i_consignment_feature_id on consignment defgoodconsignment (cost=0.42..1.68 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=4,652)

  • Index Cond: (feature_id = deffeature.id)
  • Filter: (isdefault AND (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid))
25. 4.652 4.652 ↓ 0.0 0 4,652

Index Scan using assortmentfavorite_consignment_id_retailstore_id__unique on assortmentfavorite goodfavorite (cost=0.27..0.29 rows=1 width=104) (actual time=0.001..0.001 rows=0 loops=4,652)

  • Index Cond: ((consignment_id = defgoodconsignment.id) AND (retailstore_id = '3425fb84-1184-11e8-9ff4-315000087f47'::uuid))
  • Filter: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
26. 13.956 27.912 ↑ 1.0 1 4,652

Aggregate (cost=6.04..6.05 rows=1 width=64) (actual time=0.006..0.006 rows=1 loops=4,652)

27. 3.176 13.956 ↓ 0.0 0 4,652

Nested Loop (cost=0.70..6.02 rows=1 width=58) (actual time=0.003..0.003 rows=0 loops=4,652)

28. 9.304 9.304 ↓ 0.0 0 4,652

Index Scan using u_featureattributevalue_account_feature_metadata on featureattributevalue fav (cost=0.42..2.64 rows=1 width=30) (actual time=0.002..0.002 rows=0 loops=4,652)

  • Index Cond: ((account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid) AND (f.id = parent_id))
29. 1.476 1.476 ↑ 1.0 1 738

Index Scan using attributemetadata_pkey on attributemetadata favm (cost=0.28..2.50 rows=1 width=44) (actual time=0.002..0.002 rows=1 loops=738)

  • Index Cond: (id = fav.metadata_id)
  • Filter: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
30. 27.912 60.476 ↑ 1.0 1 4,652

Aggregate (cost=8.54..8.55 rows=1 width=96) (actual time=0.013..0.013 rows=1 loops=4,652)

31. 4.665 32.564 ↑ 1.0 1 4,652

Nested Loop Left Join (cost=0.71..8.52 rows=1 width=43) (actual time=0.007..0.007 rows=1 loops=4,652)

  • Join Filter: ((p.account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid) AND (p.currency_id = c.id))
32. 4.665 23.260 ↑ 1.0 1 4,652

Nested Loop (cost=0.57..6.14 rows=1 width=67) (actual time=0.005..0.005 rows=1 loops=4,652)

  • Join Filter: (p.pricetype_id = pt.id)
33. 13.956 13.956 ↑ 1.0 1 4,652

Index Scan using u__price__parent_id__pricetype_id on price p (cost=0.42..3.77 rows=1 width=56) (actual time=0.003..0.003 rows=1 loops=4,652)

  • Index Cond: (parent_id = f.id)
  • Filter: ((value <> '0'::double precision) AND (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid))
  • Rows Removed by Filter: 0
34. 4.639 4.639 ↑ 1.0 1 4,639

Index Scan using i__pricetype__account_id on pricetype pt (cost=0.14..2.36 rows=1 width=43) (actual time=0.001..0.001 rows=1 loops=4,639)

  • Index Cond: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
35. 4.639 4.639 ↑ 1.0 1 4,639

Index Scan using i__currency__account_id on currency c (cost=0.14..2.36 rows=1 width=24) (actual time=0.001..0.001 rows=1 loops=4,639)

  • Index Cond: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
36. 23.260 55.824 ↑ 1.0 1 4,652

Aggregate (cost=8.53..8.54 rows=1 width=96) (actual time=0.012..0.012 rows=1 loops=4,652)

37. 4.652 32.564 ↑ 1.0 1 4,652

Result (cost=0.72..8.52 rows=1 width=43) (actual time=0.006..0.007 rows=1 loops=4,652)

  • One-Time Filter: (deffeature.account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
38. 4.652 27.912 ↑ 1.0 1 4,652

Nested Loop Left Join (cost=0.72..8.52 rows=1 width=43) (actual time=0.006..0.006 rows=1 loops=4,652)

  • Join Filter: ((p_1.account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid) AND (p_1.currency_id = c_1.id))
39. 4.652 18.608 ↑ 1.0 1 4,652

Nested Loop (cost=0.57..6.14 rows=1 width=67) (actual time=0.004..0.004 rows=1 loops=4,652)

  • Join Filter: (p_1.pricetype_id = pt_1.id)
40. 9.304 9.304 ↑ 1.0 1 4,652

Index Scan using u__price__parent_id__pricetype_id on price p_1 (cost=0.42..3.76 rows=1 width=56) (actual time=0.002..0.002 rows=1 loops=4,652)

  • Index Cond: (parent_id = deffeature.id)
  • Filter: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
41. 4.652 4.652 ↑ 1.0 1 4,652

Index Scan using i__pricetype__account_id on pricetype pt_1 (cost=0.14..2.36 rows=1 width=43) (actual time=0.001..0.001 rows=1 loops=4,652)

  • Index Cond: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
42. 4.652 4.652 ↑ 1.0 1 4,652

Index Scan using i__currency__account_id on currency c_1 (cost=0.14..2.36 rows=1 width=24) (actual time=0.001..0.001 rows=1 loops=4,652)

  • Index Cond: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
43. 4.652 13.956 ↑ 1.0 1 4,652

Aggregate (cost=7.67..7.68 rows=1 width=128) (actual time=0.003..0.003 rows=1 loops=4,652)

44. 0.000 9.304 ↓ 0.0 0 4,652

Nested Loop Left Join (cost=0.97..7.65 rows=1 width=44) (actual time=0.002..0.002 rows=0 loops=4,652)

45. 4.630 9.304 ↓ 0.0 0 4,652

Nested Loop Left Join (cost=0.70..5.15 rows=1 width=53) (actual time=0.002..0.002 rows=0 loops=4,652)

46. 4.652 4.652 ↓ 0.0 0 4,652

Index Scan using goodpack_good_index on goodpack gp (cost=0.28..2.50 rows=1 width=40) (actual time=0.001..0.001 rows=0 loops=4,652)

  • Index Cond: (good_id = g.id)
  • Filter: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
47. 0.022 0.022 ↓ 0.0 0 11

Index Scan using i__barcode__goodpack_id on barcode bc (cost=0.42..2.64 rows=1 width=29) (actual time=0.002..0.002 rows=0 loops=11)

  • Index Cond: (gp.id = goodpack_id)
  • Filter: (account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid)
48. 0.022 0.022 ↑ 1.0 1 11

Index Scan using uom_pkey on uom uom_1 (cost=0.27..2.49 rows=1 width=23) (actual time=0.002..0.002 rows=1 loops=11)

  • Index Cond: (gp.uom_id = id)
49.          

SubPlan (for Nested Loop Left Join)

50. 9.304 23.260 ↑ 1.0 1 4,652

Aggregate (cost=2.64..2.65 rows=1 width=32) (actual time=0.005..0.005 rows=1 loops=4,652)

51. 13.956 13.956 ↑ 1.0 1 4,652

Index Scan using i__barcode__consignment_id on barcode bc_1 (cost=0.42..2.64 rows=1 width=13) (actual time=0.003..0.003 rows=1 loops=4,652)

  • Index Cond: ((account_id = '33a4c5d9-1184-11e8-9109-f8fc00008524'::uuid) AND (consignment_id = defconsignment.id))
Planning time : 45.254 ms
Execution time : 359.637 ms