explain.depesz.com

PostgreSQL's explain analyze made readable

Result: E6nY : In Creation Fetch ohne chat

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.003 0.392 ↑ 1.0 1 1

Aggregate (cost=4,239.99..4,240.00 rows=1 width=8) (actual time=0.392..0.392 rows=1 loops=1)

2. 0.005 0.389 ↑ 108.8 9 1

Nested Loop (cost=71.90..4,237.54 rows=979 width=0) (actual time=0.249..0.389 rows=9 loops=1)

  • Join Filter: (lc_1.lead_id = lc.lead_id)
3. 0.002 0.375 ↑ 80.7 9 1

Nested Loop (cost=71.61..3,796.87 rows=726 width=16) (actual time=0.246..0.375 rows=9 loops=1)

4. 0.009 0.364 ↑ 80.7 9 1

Hash Join (cost=71.32..3,426.40 rows=726 width=8) (actual time=0.243..0.364 rows=9 loops=1)

  • Hash Cond: (lc_1.owner_user_id = mv_user_data.id)
  • Join Filter: ((((lc_1.owner_user_id = 3702) AND (lc_1.owner_user_id IS NOT NULL)) OR ((mv_user_data.belongsto_company_id = 27) AND (mv_user_data.belongsto_company_id IS NOT NULL) AND ((lc_1.owner_user_id <> 3702) OR (lc_1.owner_user_id IS NULL))) OR (mv_user_data.belongsto_company_id <> 27) OR (mv_user_data.belongsto_company_id IS NULL)) AND (((lc_1.owner_user_id = 3702) AND (lc_1.owner_user_id IS NOT NULL)) OR ((mv_user_data.belongsto_company_id = 27) AND (mv_user_data.belongsto_company_id IS NOT NULL)) OR ((mv_user_data.belongsto_reseller_id = ANY ('{2048,2049,2050,2051,3331,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,4623,2064,2065,4625,2066,2067,2068,2069,2070,2071,2072,2073,2074,2075,2076,2077,2078,2079,2080,2081,2082,2083,2084,2085,2086,2087,2088,2089,2090,2091,4651,2092,2093,2094,2095,2096,2097,2098,2099,2100,2101,2102,2103,4407,2104,4185,4187,4743,4745,4746,4747,4748,4749,4750,4751,4752,4753,4754,4755,4756,4757,4758,4759,4760,4761,4762,4763,4507,4764,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,4055,2008,2009,2010,2011,4059,2012,2013,4061,2014,2015,4063,2016,2017,4065,2018,2019,4067,2020,2021,4069,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047}'::bigint[])) AND (mv_user_data.belongsto_reseller_id IS NOT NULL))))
5. 0.098 0.290 ↑ 151.2 9 1

Hash Join (cost=54.44..3,391.67 rows=1,361 width=33,935) (actual time=0.173..0.290 rows=9 loops=1)

  • Hash Cond: (lc_1.dealreg_dealreg_id = d.id)
6. 0.001 0.188 ↑ 151.2 9 1

Nested Loop Left Join (cost=53.33..2,638.82 rows=1,361 width=126) (actual time=0.102..0.188 rows=9 loops=1)

  • Filter: ((lc_1.lead_masterdata_id IS NOT NULL) OR (lc_1.lead_contact_id IS NOT NULL) OR (lc_1.lead_custom1_id IS NOT NULL) OR (lc_1.lead_category_id IS NOT NULL) OR (lpc.surname IS NOT NULL) OR (lc_1.created_by = 3702))
7. 0.003 0.160 ↑ 151.2 9 1

Nested Loop (cost=53.04..2,170.72 rows=1,361 width=129) (actual time=0.094..0.160 rows=9 loops=1)

8. 0.014 0.139 ↑ 151.2 9 1

Nested Loop (cost=52.75..1,739.18 rows=1,361 width=129) (actual time=0.088..0.139 rows=9 loops=1)

9. 0.008 0.008 ↓ 3.0 3 1

Seq Scan on t_status s (cost=0.00..1.25 rows=1 width=8) (actual time=0.005..0.008 rows=3 loops=1)

  • Filter: ((((creatoractionrequired)::text = 'Y'::text) OR (shortname IS NULL)) AND ((((creatoractionrequired)::text = 'Y'::text) AND (creatoractionrequired IS NOT NULL)) OR (shortname IS NULL)))
  • Rows Removed by Filter: 14
10. 0.087 0.117 ↑ 642.7 3 3

Bitmap Heap Scan on t_lead_current lc_1 (cost=52.75..1,718.64 rows=1,928 width=137) (actual time=0.028..0.039 rows=3 loops=3)

  • Recheck Cond: (status_id = s.id)
  • Heap Blocks: exact=80
11. 0.030 0.030 ↑ 13.9 139 3

Bitmap Index Scan on ix_lead_current_status (cost=0.00..52.27 rows=1,928 width=0) (actual time=0.010..0.010 rows=139 loops=3)

  • Index Cond: (status_id = s.id)
12. 0.018 0.018 ↑ 1.0 1 9

Index Only Scan using t_lead_pkey on t_lead l (cost=0.29..0.32 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=9)

  • Index Cond: (id = lc_1.lead_id)
  • Heap Fetches: 9
13. 0.027 0.027 ↑ 1.0 1 9

Index Scan using ix_leperson_cur_lead on t_lead_person_current lpc (cost=0.29..0.33 rows=1 width=45) (actual time=0.002..0.003 rows=1 loops=9)

  • Index Cond: (lc_1.lead_id = lead_id)
  • Filter: (((maincontact)::text = 'Y'::text) AND ((deleted)::text = 'N'::text))
14. 0.001 0.004 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=8) (actual time=0.004..0.004 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.003 0.003 ↑ 1.0 5 1

Seq Scan on t_dealreg d (cost=0.00..1.05 rows=5 width=8) (actual time=0.002..0.003 rows=5 loops=1)

16. 0.020 0.065 ↓ 1.0 222 1

Hash (cost=14.17..14.17 rows=217 width=24) (actual time=0.065..0.065 rows=222 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
17. 0.045 0.045 ↓ 1.0 222 1

Seq Scan on mv_user_data (cost=0.00..14.17 rows=217 width=24) (actual time=0.005..0.045 rows=222 loops=1)

18. 0.009 0.009 ↑ 1.0 1 9

Index Only Scan using t_lead_pkey on t_lead (cost=0.29..0.51 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=9)

  • Index Cond: (id = lc_1.lead_id)
  • Heap Fetches: 9
19. 0.009 0.009 ↑ 1.0 1 9

Index Scan using uc_lead_current_lead_id on t_lead_current lc (cost=0.29..0.59 rows=1 width=21) (actual time=0.001..0.001 rows=1 loops=9)

  • Index Cond: (lead_id = t_lead.id)
Planning time : 2.129 ms
Execution time : 0.519 ms