pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Joseph Krogh <andreas@visena.com>
To: Semen Yefimenko <semen.yefimenko@gmail.com>
Cc: Alexey M Boltenkov <padrebolt@yandex.ru>
Cc: luis.roberto@siscobra.com.br, pgsql-performance <pgsql-performance@lists.postgresql.org>
Subject: Re: Very slow Query compared to Oracle / SQL - Server
Date: Thu, 6 May 2021 21:26:07 +0200 (CEST)
Message-ID: <VisenaEmail.2.8fd1850819f96dd.1794322fd82@tc7-visena> (raw)
In-Reply-To: <CAKnyMoKbM+eQMEr1R4dk_5XmPttNJjD6ymxb4sbTmvWjqc8yRQ@mail.gmail.com>
References: <CAKnyMoKUUSPiH=0QaM38GYm8UqVeR47HmX+MX+UpyL0mLERBrw@mail.gmail.com>
	<1368981627.1376962.1620317467043.JavaMail.zimbra@siscobra.com.br>
	<9a713ea4-f672-412c-70c3-34b82c275b7f@yandex.ru>
	<986d20ff-a662-6821-68f4-d5a8ba304eb7@yandex.ru>
	<CAKnyMoKbM+eQMEr1R4dk_5XmPttNJjD6ymxb4sbTmvWjqc8yRQ@mail.gmail.com>


På torsdag 06. mai 2021 kl. 20:59:34, skrev Semen Yefimenko <
semen.yefimenko@gmail.com <mailto:semen.yefimenko@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.
CREATE INDEX idx_arcstatus_le1 ON schema.logtable ( archivestatus ) where 
(archivestatus <= 1) 
ANALYZE schema.logtable 

 This resulted in this query plan:
 [...] 

I assume (4000,4001,4002) are just example-values and that they might be 
anything? Else you can just include them in your partial-index. 



--
 Andreas Joseph Krogh 

view thread (25+ messages)  latest in thread

Message-ID: <VisenaEmail.2.8fd1850819f96dd.1794322fd82@tc7-visena>
Permalink:  ../VisenaEmail.2.8fd1850819f96dd.1794322fd82@tc7-visena/
Also on:    postgresql.org/message-id/VisenaEmail.2.8fd1850819f96dd.1794322fd82@tc7-visena

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: andreas@visena.com, semen.yefimenko@gmail.com, padrebolt@yandex.ru, pgsql-performance@lists.postgresql.org
  Subject: Re: Very slow Query compared to Oracle / SQL - Server
  In-Reply-To: <VisenaEmail.2.8fd1850819f96dd.1794322fd82@tc7-visena>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox