Re: Suddenly all queries moved to seq scan

2024-11-20 Thread Justin
On Wed, Nov 20, 2024 at 9:09 AM Sreejith P wrote: > > > > Queries were taking 20 ms started taking 60 seconds. So have done SQL > analyse to understand about query plan. There we found that query planner > taking seq scan instead in index scan. > > I would like to add one ore point. A delete que

Re: Suddenly all queries moved to seq scan

2024-11-20 Thread Sreejith P
> On 20 Nov 2024, at 6:32 PM, Daniel Gustafsson wrote: > >> On 20 Nov 2024, at 11:50, Sreejith P wrote: > >> We are using PostgresQL 10 in our production database. We have around 890 >> req /s request on peak time. > > PostgreSQL 10 is well out of support and does not receive bugfixes or

Re: Suddenly all queries moved to seq scan

2024-11-20 Thread Efrain J. Berdecia
Make sure to run analyze on the entire database, possibly using vacuumdb would be faster. Also, check for invalid indexes. Efrain J. Berdecia On Wednesday, November 20, 2024 at 08:02:36 AM EST, Daniel Gustafsson wrote: > On 20 Nov 2024, at 11:50, Sreejith P wrote: > We are using Pos

Re: Suddenly all queries moved to seq scan

2024-11-20 Thread Daniel Gustafsson
> On 20 Nov 2024, at 11:50, Sreejith P wrote: > We are using PostgresQL 10 in our production database. We have around 890 > req /s request on peak time. PostgreSQL 10 is well out of support and does not receive bugfixes or security fixes, you should plan a migration to a supported version soon

Re: Suddenly all queries moved to seq scan

2024-11-20 Thread Achilleas Mantzios - cloud
On 11/20/24 12:50, Sreejith P wrote: Hi, We are using PostgresQL 10 in our production database. We have around 890 req /s request on peak time. We have 1 primary and 4 slave databases as well in the same postgres cluster. 2 days back we applied some patches in the primary server and rest