From: Eric Comeau <ecomeau@signiant.com>
To: Jayadevan M <Jayadevan.Maymala@ibsplc.com>
Subject: Re: How to get FK to use new index without restarting the database
Date: Thu, 16 Dec 2010 07:55:46 -0500
Message-ID: <4D0A0C52.10001@signiant.com> (raw)
In-Reply-To: <OFC47B4729.FAF27BE5-ON652577FB.0044D994-652577FB.00452962@ibsplc.com>
References: <iecvmj$1j93$1@news.hub.org>
<OFC47B4729.FAF27BE5-ON652577FB.0044D994-652577FB.00452962@ibsplc.com>
On 10-12-16 07:34 AM, Jayadevan M wrote:
> Hello,
>> Is there a way force the db to re-evaluate its execution plan for a FK
>> without bouncing the DB?
>>
>> PostgreSQL 8.1.17
>>
>> In our latest release our developers have implemented some new foreign
>> keys but forgot to create indexes on these keys.
>>
>> The problem surfaced at one of our client installs where a maintenance
>> DELETE query was running for over 24 hrs. We have since then identified
>> the missing indexes and have sent the client a script to create them,
>> but in our testing we could not been able to get postgres to use the new
>
>> index for the FK cascade delete without bouncing the database.
> Did you try analyze? May be it will help.
> http://www.postgresql.org/docs/9.0/static/sql-analyze.html
Yes we did. Thanks for the suggestion.
>
> Regards,
> Jayadevan
>
>
>
>
>
> DISCLAIMER:
>
> "The information in this e-mail and any attachment is intended only for
> the person to whom it is addressed and may contain confidential and/or
> privileged material. If you have received this e-mail in error, kindly
> contact the sender and destroy all copies of the original communication.
> IBS makes no warranty, express or implied, nor guarantees the accuracy,
> adequacy or completeness of the information contained in this email or any
> attachment and is not liable for any errors, defects, omissions, viruses
> or for resultant loss or damage, if any, direct or indirect."
>
>
>
>
>
>
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: ecomeau@signiant.com, Jayadevan.Maymala@ibsplc.com
Subject: Re: How to get FK to use new index without restarting the database
In-Reply-To: <4D0A0C52.10001@signiant.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