RE: Window functions speed

2020-08-20 Thread Zahir Lalani
Confidential From: Michael Lewis Sent: 19 August 2020 20:53 To: Zahir Lalani Cc: pgsql-gene...@postgresql.org Subject: Re: Window functions speed Where's the query? Are you able to run explain analyze so we can see estimates vs actual counts? What version are you using? Can you share ex

Re: Window functions speed

2020-08-19 Thread Michael Lewis
Where's the query? Are you able to run explain analyze so we can see estimates vs actual counts? What version are you using? Can you share explain analyze before and after the window function? I mean, that limit at the top makes me think it is doing a lot less work without the window function, vs

Window functions speed

2020-08-19 Thread Zahir Lalani
Confidential Hello I have spent the last day optimising a critical query which suddenly started behaving very inefficiently. There were issues with the query which are now sorted. The base query is now working in a timeframe that is far better. However, as soon as I add a window count function