Re: Index bloat and REINDEX/VACUUM optimization for partial index

2023-08-30 Thread jayaprabhakar k
On Tue, Aug 29, 2023, 12:43 PM Jeff Janes wrote: > On Mon, Aug 28, 2023 at 8:33 PM jayaprabhakar k > wrote: > >> Hi, >> >> TL;DR: >> Observations: >> >>1. REINDEX requires a full table scan >> - Roughly create a new index, rename index, drop old index. >> - REINDEX is not increme

Re: Queries containing ORDER BY and LIMIT started to work slowly

2023-08-30 Thread David Rowley
On Thu, 31 Aug 2023 at 06:32, Rondat Flyag wrote: > I tried VACUUM ANALYZE for three tables, but without success. I also tried to > set enable_seqscan=off and the query took even more time. If I set > enable_sort=off then the query takes a lot of time and I cancel it. > > Please see the attached

Re: Queries containing ORDER BY and LIMIT started to work slowly

2023-08-30 Thread Rondat Flyag
Thanks for the response.Sure, I thought about it and even bought another drive. The current drive is SSD, as far as I'm concerned write operations degrade SSDs. Even so, why other queries work fine? Why the query joining two tables instead of three works fine? Cheers,Serg 30.08.2023, 00:07, "Rick O

Re: Queries containing ORDER BY and LIMIT started to work slowly

2023-08-30 Thread Rondat Flyag
Hi and thank you for the response. I tried VACUUM ANALYZE for three tables, but without success. I also tried to set enable_seqscan=off and the query took even more time. If I set enable_sort=off then the query takes a lot of time and I cancel it. Please see the attached query plans. Cheers,Serg 29