Re: Very slow Query compared to Oracle / SQL - Server

2021-05-06 Thread Imre Samu
*> Postgres Version : *PostgreSQL 12.2, > ... ON ... USING btree IMHO: The next minor (bugix&security) release is near ( expected ~ May 13th, 2021 ) https://www.postgresql.org/developer/roadmap/ so you can update your PostgreSQL to 12.7 ( + full Reindexing recommended ! ) You can find a lot o

Re: Very slow Query compared to Oracle / SQL - Server

2021-05-06 Thread Alexey M Boltenkov
On 05/06/21 23:02, Alexey M Boltenkov wrote: On 05/06/21 22:58, Alexey M Boltenkov wrote: Have you try of excluding not null from index? Can you give dispersion of archivestatus? 06.05.2021, 21:59, "Semen Yefimenko" : Yes, rewriting the query with an IN clause was also my first appro

Re: Very slow Query compared to Oracle / SQL - Server

2021-05-06 Thread Alexey M Boltenkov
On 05/06/21 22:58, Alexey M Boltenkov wrote: Have you try of excluding not null from index? Can you give dispersion of archivestatus? 06.05.2021, 21:59, "Semen Yefimenko" : Yes, rewriting the query with an IN clause was also my first approach, but I didn't help much. The Query pla

Re: Very slow Query compared to Oracle / SQL - Server

2021-05-06 Thread Justin Pryzby
On Thu, May 06, 2021 at 04:38:39PM +0200, Semen Yefimenko wrote: > Hi there, > > I've recently been involved in migrating our old system to SQL Server and > then PostgreSQL. Everything has been working fine so far but now after > executing our tests on Postgres, we saw a very slow running query on

Re: Very slow Query compared to Oracle / SQL - Server

2021-05-06 Thread Alexey M Boltenkov
Have you try of excluding not null from index? Can you give dispersion of archivestatus?06.05.2021, 21:59, "Semen Yefimenko" :Yes, rewriting the query with an IN clause was also my first approach, but I didn't help much. The Query plan did change a little bit but the performance was not impacted.CR

Re: Very slow Query compared to Oracle / SQL - Server

2021-05-06 Thread Vijaykumar Jain
I am not sure, if the goal is just for the specific set of predicates or performance in general. Also from the explain plan, it seems there is still a significant amount of buffers read vs hit. That would constitute i/o and may add to slow result. What is the size of the table and the index ? Is

Re: Very slow Query compared to Oracle / SQL - Server

2021-05-06 Thread Andreas Joseph Krogh
På torsdag 06. mai 2021 kl. 20:59:34, skrev Semen Yefimenko < semen.yefime...@gmail.com >: Yes, rewriting the query with an IN clause was also my first approach, but I didn't help much. The Query plan did change a little bit but the performance was not impacted

Re: Very slow Query compared to Oracle / SQL - Server

2021-05-06 Thread Semen Yefimenko
Yes, rewriting the query with an IN clause was also my first approach, but I didn't help much. The Query plan did change a little bit but the performance was not impacted. CREATE INDEX idx_arcstatus_le1 ON schema.logtable ( archivestatus ) where (archivestatus <= 1) ANALYZE schema.logtable This

Re: Very slow Query compared to Oracle / SQL - Server

2021-05-06 Thread Alexey M Boltenkov
On 05/06/21 21:15, Alexey M Boltenkov wrote: On 05/06/21 19:11, luis.robe...@siscobra.com.br wrote: - Mensagem original - De: "Semen Yefimenko" Para: "pgsql-performance" Enviadas: Quinta-feira, 6 de maio de 2021 11:38:39 Assunto: Very slow Query compared to Oracle / SQL - Server SELECT

Re: Very slow Query compared to Oracle / SQL - Server

2021-05-06 Thread Alexey M Boltenkov
On 05/06/21 19:11, luis.robe...@siscobra.com.br wrote: - Mensagem original - De: "Semen Yefimenko" Para: "pgsql-performance" Enviadas: Quinta-feira, 6 de maio de 2021 11:38:39 Assunto: Very slow Query compared to Oracle / SQL - Server SELECT column1,..., column54 where ((entrytype =

Re: Very slow Query compared to Oracle / SQL - Server

2021-05-06 Thread luis . roberto
- Mensagem original - > De: "Semen Yefimenko" > Para: "pgsql-performance" > Enviadas: Quinta-feira, 6 de maio de 2021 11:38:39 > Assunto: Very slow Query compared to Oracle / SQL - Server > SELECT column1,..., column54 where ((entrytype = 4000 or entrytype = 4001 or > entrytype = 4002

Very slow Query compared to Oracle / SQL - Server

2021-05-06 Thread Semen Yefimenko
Hi there, I've recently been involved in migrating our old system to SQL Server and then PostgreSQL. Everything has been working fine so far but now after executing our tests on Postgres, we saw a very slow running query on a large table in our database. I have tried asking on other platforms but