Re: PL/PgSQL Index Usage with Trigger Variables

From: Thomas F(dot)O'Connell <tfo(at)sitening(dot)com>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: PgSql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: PL/PgSQL Index Usage with Trigger Variables
Date: 2005-01-20 07:20:16
Message-ID: BBB61F12-6AB3-11D9-8391-000D93AE0944@sitening.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I think I see what was happening. I was looking at the output of the
SELECT that is used for opening a cursor. Got it. Thanks for your help.
It's kind of a meta-select in the printed version of a plan if the
cursor being opened is a SELECT.

-tfo

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005

On Jan 19, 2005, at 3:36 AM, Michael Fuhr wrote:

> On Wed, Jan 19, 2005 at 01:46:33AM -0600, Thomas F.O'Connell wrote:
>
>> Follow-up question: are indexes used in dynamically executed queries?
>>
>> Rather than SEQSCAN or INDEXSCAN in the DETAIL item, I see RESULT
>> followed by a large amount of unreadable (by me) output.
>
> Are you sure you're looking at the right DETAIL? Adding some
> RAISE INFO or RAISE DEBUG statements can help you pinpoint which
> log output belongs to which part of the function.
>
> I just wrote a test function that used EXECUTE to do an UPDATE and
> a SELECT loop and saw INDEXSCAN in the relevant DETAIL sections.
>
> --
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2005-01-20 07:32:37 Re: Unique Index
Previous Message David Garamond 2005-01-20 07:03:03 Re: Unique Index