explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pIxo : yatas aylık export

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Result (cost=3,383,756.35..3,383,871.04 rows=1 width=5,240) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=3,383,756.35..3,383,756.36 rows=1 width=2,441) (actual rows= loops=)

  • Sort Key: "order".vtable_row_id
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=271,618.42..3,383,756.34 rows=1 width=2,441) (actual rows= loops=)

  • Join Filter: ("order".related_id = tbl_person.person_id)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=79,864.99..1,341,113.18 rows=1 width=1,636) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=79,864.56..1,341,109.69 rows=1 width=1,088) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on tbl_vtable_row ordered_products (cost=79,864.12..1,340,700.52 rows=118 width=548) (actual rows= loops=)

  • Recheck Cond: (vtable_id = 102)
  • Filter: ((NOT is_trash) AND (NOT (custom_data @> '{"cf_283": "null"}'::jsonb)) AND ((custom_data ->> 'cf_283'::text) IS NOT NULL) AND (channel_id = 89) AND ((custom_data ->> 'cf_283'::text) <> ''::text) AND ((custom_data ->> 'cf_358'::text) = '11'::text) AND (((custom_data ->> 'cf_283'::text))::bigint >= '1527800400000'::bigint) AND (((custom_data ->> 'cf_283'::text))::bigint <= '1585688399000'::bigint))
7. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_vtable_row_vtable_id_related_id (cost=0.00..79,864.09 rows=4,809,888 width=0) (actual rows= loops=)

  • Index Cond: (vtable_id = 102)
8. 0.000 0.000 ↓ 0.0

Index Scan using tbl_vtable_row_pkey on tbl_vtable_row product (cost=0.44..3.47 rows=1 width=548) (actual rows= loops=)

  • Index Cond: (vtable_row_id = ((ordered_products.custom_data ->> 'cf_277'::text))::bigint)
  • Filter: ((vtable_id = 100) AND ((custom_data_slug ->> 'cf_276'::text) = ANY ('{tesla-sleep-visco,visco-therapy-balance,visco-therapy-spa,visco-therapy-free}'::text[])))
9. 0.000 0.000 ↓ 0.0

Index Scan using tbl_vtable_row_pkey on tbl_vtable_row "order" (cost=0.43..3.48 rows=1 width=556) (actual rows= loops=)

  • Index Cond: (vtable_row_id = ordered_products.related_id)
  • Filter: ((NOT is_trash) AND (NOT is_trash) AND (channel_id = 89) AND (vtable_id = 101) AND (((custom_data_slug ->> 'cf_297'::text) !~* '^.*(iade).*'::text) OR ((custom_data_slug ->> 'cf_297'::text) IS NULL)) AND (((custom_data_slug ->> 'cf_345'::text) <> ALL ('{musteri-hzm,yatas-bayi3456435,selena}'::text[])) OR ((custom_data_slug ->> 'cf_345'::text) IS NULL)) AND (((custom_data_slug ->> 'cf_302'::text) <> ALL ('{musteri-hzm,ankara-musteri-hizmetleri,istanbul-musteri-hizmetleri,izmir-musteri-hizmetleri,kayseri-musteri-hizmetleri,kys-kumarli}'::text[])) OR ((custom_data_slug ->> 'cf_302'::text) IS NULL)))
10. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=191,753.43..1,995,275.68 rows=3,789,398 width=765) (actual rows= loops=)

  • Hash Cond: (tbl_company.vertical_id = lkp_vertical.vertical_id)
11. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=191,730.37..1,985,284.68 rows=3,789,398 width=754) (actual rows= loops=)

  • Hash Cond: (tbl_person.company_id = tbl_company.company_id)
12. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=171,362.54..1,954,969.60 rows=3,789,398 width=731) (actual rows= loops=)

  • Hash Cond: (tbl_person.default_phone_id = tbl_person_phone.person_phone_id)
13. 0.000 0.000 ↓ 0.0

Seq Scan on tbl_person (cost=0.00..1,038,850.88 rows=3,789,398 width=739) (actual rows= loops=)

  • Filter: ((NOT is_draft) AND (((custom_data ->> 'cf_491'::text) <> ALL ('{1,2,4,5,6}'::text[])) OR ((custom_data ->> 'cf_491'::text) IS NULL)))
14. 0.000 0.000 ↓ 0.0

Hash (cost=95,239.46..95,239.46 rows=4,146,246 width=20) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Seq Scan on tbl_person_phone (cost=0.00..95,239.46 rows=4,146,246 width=20) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash (cost=18,703.48..18,703.48 rows=133,148 width=39) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Seq Scan on tbl_company (cost=0.00..18,703.48 rows=133,148 width=39) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=14.14..14.14 rows=714 width=19) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on lkp_vertical (cost=0.00..14.14 rows=714 width=19) (actual rows= loops=)

20.          

SubPlan (for Result)

21. 0.000 0.000 ↓ 0.0

Aggregate (cost=10.38..10.39 rows=1 width=32) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..10.38 rows=1 width=12) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_tbl_person_phone_phone_number on tbl_person_phone tbl_person_phone_1 (cost=0.43..3.47 rows=2 width=12) (actual rows= loops=)

  • Index Cond: (person_id = tbl_person.person_id)
  • Filter: ((phone)::text <> ''::text)
24. 0.000 0.000 ↓ 0.0

Index Scan using idx_tbl_person_phone_permission_phone on tbl_person_phone_permission tppp (cost=0.42..3.44 rows=1 width=11) (actual rows= loops=)

  • Index Cond: ((phone)::text = (tbl_person_phone_1.phone)::text)
  • Filter: is_call_authorized
25. 0.000 0.000 ↓ 0.0

Aggregate (cost=10.38..10.39 rows=1 width=32) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..10.38 rows=1 width=12) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_tbl_person_phone_phone_number on tbl_person_phone tbl_person_phone_2 (cost=0.43..3.47 rows=2 width=12) (actual rows= loops=)

  • Index Cond: (person_id = tbl_person.person_id)
  • Filter: ((phone)::text <> ''::text)
28. 0.000 0.000 ↓ 0.0

Index Scan using idx_tbl_person_phone_permission_phone on tbl_person_phone_permission tppp_1 (cost=0.42..3.44 rows=1 width=11) (actual rows= loops=)

  • Index Cond: ((phone)::text = (tbl_person_phone_2.phone)::text)
  • Filter: is_sms_authorized
29. 0.000 0.000 ↓ 0.0

Aggregate (cost=6.91..6.92 rows=1 width=32) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..6.90 rows=1 width=24) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Index Scan using idx_tbl_person_email_address_person_id on tbl_person_email_address (cost=0.43..3.45 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (person_id = tbl_person.person_id)
  • Filter: ((email_address)::text <> ''::text)
32. 0.000 0.000 ↓ 0.0

Index Scan using idx_tbl_person_email_permission_email on tbl_person_email_permission tpep (cost=0.42..3.44 rows=1 width=24) (actual rows= loops=)

  • Index Cond: ((email_address)::text = (tbl_person_email_address.email_address)::text)
  • Filter: is_authorized
33. 0.000 0.000 ↓ 0.0

Index Scan using tbl_person_pkey on tbl_person tbl_person_1 (cost=0.43..3.45 rows=1 width=1) (actual rows= loops=)

  • Index Cond: (person_id = tbl_person.person_id)
34. 0.000 0.000 ↓ 0.0

Index Scan using idx_tbl_user_user_id on tbl_user (cost=0.28..3.29 rows=1 width=14) (actual rows= loops=)

  • Index Cond: (user_id = tbl_person.create_owner_id)
35. 0.000 0.000 ↓ 0.0

Index Scan using tbl_person_pkey on tbl_person p (cost=0.43..3.45 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (person_id = tbl_person.person_id)
36. 0.000 0.000 ↓ 0.0

Seq Scan on lkp_gender (cost=0.00..1.04 rows=1 width=34) (actual rows= loops=)

  • Filter: ((gender_id <> 3) AND (gender_id = tbl_person.gender_id))
37. 0.000 0.000 ↓ 0.0

Aggregate (cost=12.15..12.16 rows=1 width=32) (actual rows= loops=)

38.          

Initplan (for Aggregate)

39. 0.000 0.000 ↓ 0.0

Aggregate (cost=10.12..10.13 rows=1 width=32) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Subquery Scan on tgs (cost=10.07..10.11 rows=2 width=51) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Unique (cost=10.07..10.09 rows=2 width=27) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Sort (cost=10.07..10.07 rows=2 width=27) (actual rows= loops=)

  • Sort Key: tbl_tag.tag_id, tbl_tag.tag_name, tbl_person_tag.product_id
43. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..10.06 rows=2 width=27) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_tbl_person_tag_2 on tbl_person_tag (cost=0.43..3.46 rows=2 width=8) (actual rows= loops=)

  • Index Cond: (person_id = tbl_person.person_id)
45. 0.000 0.000 ↓ 0.0

Index Scan using tbl_tag_pkey on tbl_tag (cost=0.28..3.30 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (tag_id = tbl_person_tag.tag_id)
46. 0.000 0.000 ↓ 0.0

Function Scan on json_array_elements item (cost=0.01..2.01 rows=1 width=32) (actual rows= loops=)

  • Filter: (((value ->> 'product_id'::text))::bigint = 203)
47. 0.000 0.000 ↓ 0.0

Aggregate (cost=15.50..15.51 rows=1 width=32) (actual rows= loops=)

48.          

Initplan (for Aggregate)

49. 0.000 0.000 ↓ 0.0

Aggregate (cost=13.47..13.48 rows=1 width=32) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Subquery Scan on tgs_1 (cost=13.39..13.45 rows=3 width=51) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Unique (cost=13.39..13.42 rows=3 width=27) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Sort (cost=13.39..13.40 rows=3 width=27) (actual rows= loops=)

  • Sort Key: tbl_tag_1.tag_id, tbl_tag_1.tag_name, tbl_company_tag.product_id
53. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.70..13.36 rows=3 width=27) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_tbl_company_tag_2 on tbl_company_tag (cost=0.42..3.47 rows=3 width=8) (actual rows= loops=)

  • Index Cond: (company_id = tbl_company.company_id)
55. 0.000 0.000 ↓ 0.0

Index Scan using tbl_tag_pkey on tbl_tag tbl_tag_1 (cost=0.28..3.30 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (tag_id = tbl_company_tag.tag_id)
56. 0.000 0.000 ↓ 0.0

Function Scan on json_array_elements item_1 (cost=0.01..2.01 rows=1 width=32) (actual rows= loops=)

  • Filter: (((value ->> 'product_id'::text))::bigint = 203)
57. 0.000 0.000 ↓ 0.0

Index Scan using tbl_person_address_pkey on tbl_person_address (cost=0.43..3.45 rows=1 width=39) (actual rows= loops=)

  • Index Cond: (person_address_id = tbl_person.default_address_id)
58. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..6.75 rows=1 width=9) (actual rows= loops=)

59. 0.000 0.000 ↓ 0.0

Index Scan using tbl_person_address_pkey on tbl_person_address tbl_person_address_1 (cost=0.43..3.45 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (person_address_id = tbl_person.default_address_id)
60. 0.000 0.000 ↓ 0.0

Index Scan using lkp_district_pkey on lkp_district (cost=0.28..3.29 rows=1 width=17) (actual rows= loops=)

  • Index Cond: (district_id = tbl_person_address_1.district_id)
61. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..6.75 rows=1 width=9) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Index Scan using tbl_person_address_pkey on tbl_person_address tbl_person_address_2 (cost=0.43..3.45 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (person_address_id = tbl_person.default_address_id)
63. 0.000 0.000 ↓ 0.0

Index Scan using lkp_city_pkey on lkp_city (cost=0.28..3.30 rows=1 width=13) (actual rows= loops=)

  • Index Cond: (city_id = tbl_person_address_2.city_id)
64. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..6.63 rows=1 width=11) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Index Scan using tbl_person_address_pkey on tbl_person_address tbl_person_address_3 (cost=0.43..3.45 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (person_address_id = tbl_person.default_address_id)
66. 0.000 0.000 ↓ 0.0

Index Scan using lkp_country_pkey on lkp_country (cost=0.14..3.16 rows=1 width=15) (actual rows= loops=)

  • Index Cond: (country_id = tbl_person_address_3.country_id)
67. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.86..6.89 rows=1 width=24) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Index Scan using tbl_person_pkey on tbl_person tbl_person_2 (cost=0.43..3.45 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (person_id = tbl_person.person_id)
69. 0.000 0.000 ↓ 0.0

Index Scan using tbl_person_email_pkey on tbl_person_email_address tpea (cost=0.43..3.45 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (person_email_id = tbl_person_2.default_email_id)