On Tue, 8 Jan 2019 at 06:45, Mitar wrote:
> So it could learn that the values used are not distinct values, or
> that column values are not uniformly distributed? And maybe decide to
> change the plan? So it makes a plan, runs it, determines that the plan
> was not as good as expected, I run it ag
Hi!
On Mon, Jan 7, 2019 at 12:44 AM David Rowley
wrote:
> If you're asking if it caches the result and foregoes scanning the
> underlying tables, then that's a "No". Else what further optimising
> did you have in mind?
For example, it could learn better statistics. In documentation [1] it
is wr
On Mon, 7 Jan 2019 at 21:40, Mitar wrote:
>
> On Mon, Jan 7, 2019 at 12:09 AM David Rowley
> wrote:
> > On Mon, 7 Jan 2019 at 18:54, Mitar wrote:
> > > If I have a PREPAREd query without parameters (static) and I EXECUTE
> > > it repeatedly in the same session, does PostgreSQL learn/optimize
> >
Hi!
On Mon, Jan 7, 2019 at 12:09 AM David Rowley
wrote:
> On Mon, 7 Jan 2019 at 18:54, Mitar wrote:
> > If I have a PREPAREd query without parameters (static) and I EXECUTE
> > it repeatedly in the same session, does PostgreSQL learn/optimize
> > anything across those runs?
>
> Yes, it will gene
On Mon, 7 Jan 2019 at 18:54, Mitar wrote:
> If I have a PREPAREd query without parameters (static) and I EXECUTE
> it repeatedly in the same session, does PostgreSQL learn/optimize
> anything across those runs?
Yes, it will generate the query plan on the first invocation of
EXECUTE and use that p
Hi!
If I have a PREPAREd query without parameters (static) and I EXECUTE
it repeatedly in the same session, does PostgreSQL learn/optimize
anything across those runs?
Mitar
--
http://mitar.tnode.com/
https://twitter.com/mitar_m