Re: optimization issue

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Atul Kumar <akumar14871(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: optimization issue
Date: 2021-07-08 12:30:26
Message-ID: CAHOFxGrVbU7CWVEVZaOfmz2x8xrF2fZoXkm_6aewY87tXL5+Rg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

((current_setting('env.groupid'::text))::integer)::numeric

If you pass this value in directly as part of the query string, how does it
perform? It seems like calling the function to get this value may be
creating a planning problem with the value unknown at plan time. If you
were able to put the result on an analyzed temp table at least, I'd expect
that the planner would have enough info to make good decisions.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message zickzack 2021-07-08 14:01:25 Re: Re: Insert/Dump/Restore table with generated columns
Previous Message Michael Lewis 2021-07-08 12:23:38 Re: On partitioning, PKs and FKs