Re: Seeing execution plan of foreign key constraint check?

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Robert Klemme <shortcutter(at)googlemail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Seeing execution plan of foreign key constraint check?
Date: 2016-07-23 01:57:07
Message-ID: 1420044a-d3ac-b503-9fff-e5ed29e223e7@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 7/22/16 3:37 AM, Robert Klemme wrote:
> I am wondering what to do if the same statement has multiple execution
> plans if that is possible in such a scenario. Present all the plans or
> just the one with the highest impact? Show them next to each other so
> the user is immediately aware that all these plans originated from the
> same piece of SQL?

plpgsql runs all it's stuff via SPI, which can replan queries. So yes, I
think it's necessary to deal with that.

That said, if we only kept the most expensive X plans from a given
function, that could handle both cases.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532) mobile: 512-569-9461

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Abadie Lana 2016-07-25 15:26:46 Very slow query (3-4mn) on a table with 25millions rows
Previous Message Tom Lane 2016-07-22 14:29:30 Re: [PERFORMANCE] Performance index and table