pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vitaliy Garnashevich <vgarnashevich@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: Tricking the optimizer
Date: Wed, 18 Apr 2018 19:01:44 +0300
Message-ID: <2a11d6ec-837e-5284-38cf-efedc52dbbd2@gmail.com> (raw)
In-Reply-To: <28215.1524059471@sss.pgh.pa.us>
References: <612dae0f-16b3-e5f8-7458-1ec38aea163c@gmail.com>
	<28215.1524059471@sss.pgh.pa.us>

We'd rather avoid writing C code. We're trying to stick with the DB 
functionality provided by default.

Could something like the following, in theory, make things at least 
somewhat better in our case (without using the selectivity override)?

... WHERE coalesce(securityFilter1 AND securityFilter2 AND 
securityFilter3)::bool;

Regards,
Vitaliy





view thread (4+ messages)  latest in thread

Message-ID: <2a11d6ec-837e-5284-38cf-efedc52dbbd2@gmail.com>
Permalink:  ../2a11d6ec-837e-5284-38cf-efedc52dbbd2@gmail.com/
Also on:    postgresql.org/message-id/2a11d6ec-837e-5284-38cf-efedc52dbbd2@gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: vgarnashevich@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Tricking the optimizer
  In-Reply-To: <2a11d6ec-837e-5284-38cf-efedc52dbbd2@gmail.com>
  References: <612dae0f-16b3-e5f8-7458-1ec38aea163c@gmail.com> <28215.1524059471@sss.pgh.pa.us> <2a11d6ec-837e-5284-38cf-efedc52dbbd2@gmail.com>

* 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