Re: Re. Select with where condition times out

2024-07-22 Thread Francisco Olarte
Trying to trim to still relevant parts, as mail is becoming extremely hard to read. On Mon, 22 Jul 2024 at 07:08, sivapostg...@yahoo.com wrote: > Actual Query: > select source_node_id, create_time from sym_data where table_name = > 'tx_combined_sales_header' and ((event_type = 'I' and row_data

Re: Re. Select with where condition times out

2024-07-21 Thread sivapostg...@yahoo.com
On Saturday, 20 July, 2024 at 10:55:30 pm IST, Francisco Olarte wrote: Hi: Please, avoid top posting, specially when replying to long mail with various points,m it makes it nearly impossible to track what you are replying to. OK On Sat, 20 Jul 2024 at 13:44, sivapostg...@yahoo.com

Re: Re. Select with where condition times out

2024-07-21 Thread sivapostg...@yahoo.com
On Sunday, 21 July, 2024 at 12:52:22 am IST, Michael Nolan wrote: On Thu, Jul 18, 2024 at 4:38 AM sivapostg...@yahoo.com wrote: > > Hello, > PG V11 > > Select count(*) from table1 > Returns 10456432 > > Select field1, field2 from table1 where field3> '2024-07-18 12:00:00' > Times out

Re: Re. Select with where condition times out

2024-07-20 Thread Michael Nolan
On Thu, Jul 18, 2024 at 4:38 AM sivapostg...@yahoo.com wrote: > > Hello, > PG V11 > > Select count(*) from table1 > Returns 10456432 > > Select field1, field2 from table1 where field3> '2024-07-18 12:00:00' > Times out > > The above query was working fine for the past 2 years. > > Backup was taken

Re: Re. Select with where condition times out

2024-07-20 Thread Francisco Olarte
Hi: Please, avoid top posting, specially when replying to long mail with various points,m it makes it nearly impossible to track what you are replying to. On Sat, 20 Jul 2024 at 13:44, sivapostg...@yahoo.com wrote: > Executed > VACUUM FULL VERBOSE > followed by > REINDEX DATABASE dbname; As it

Re: Re. Select with where condition times out

2024-07-20 Thread Ron Johnson
(Because VACUUM FULL rewrites the table, an implicit REINDEX occurs.) I don't see mention of analyzing the database. Also, VACUUM FULL probably doesn't do what you think it does. On Sat, Jul 20, 2024 at 7:44 AM sivapostg...@yahoo.com < sivapostg...@yahoo.com> wrote: > Executed > VACUUM FULL VER

Re: Re. Select with where condition times out

2024-07-20 Thread sivapostg...@yahoo.com
Executed VACUUM FULL VERBOSEfollowed byREINDEX DATABASE dbname; It didn't increase the performance, still time out happened.  VACUUM didn't find any dead rows in that particular table.   Yes, the actual query and conditions were not given in my first comment.  Actually where condition is not on

Re: Re. Select with where condition times out

2024-07-18 Thread Francisco Olarte
On Thu, 18 Jul 2024 at 11:38, sivapostg...@yahoo.com wrote: > Hello, > PG V11 > > Select count(*) from table1 > Returns 10456432 > > Select field1, field2 from table1 where field3> '2024-07-18 12:00:00' > Times out How do you send the query / how does it time out? Is that the real query? Is table

Re: Re. Select with where condition times out

2024-07-18 Thread Kashif Zeeshan
Hi It can be caused due to Table Bloat, table bloat can slow down queries. Use the pg_repack extension or VACUUM FULL to try ti fix this table bloat issue. You can refer to following link https://supabase.com/blog/postgres-bloat Regards Kashif Zeeshan On Thu, Jul 18, 2024 at 2:38 PM sivapostg...

Re. Select with where condition times out

2024-07-18 Thread sivapostg...@yahoo.com
Hello,PG V11 Select count(*) from table1Returns 10456432 Select field1, field2 from table1 where field3> '2024-07-18 12:00:00' Times out The above query was working fine for the past 2 years.   Backup was taken a day back.  Need to recover complete data as far as possible. Any possible way(s) to do