pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anssi Kääriäinen <anssi.kaariainen@thl.fi>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Disabling nested loops - worst case performance
Date: Fri, 18 Mar 2011 12:58:48 +0200
Message-ID: <4D833AE8.9020608@thl.fi> (raw)
In-Reply-To: <AANLkTi=kdWVCKBZPUHFE-8pd8MLzCDVjVpG14iRtkyGf@mail.gmail.com>
References: <4D8306A7.7020205@thl.fi>
	<AANLkTi=kdWVCKBZPUHFE-8pd8MLzCDVjVpG14iRtkyGf@mail.gmail.com>

On 03/18/2011 09:02 AM, Pavel Stehule wrote:
> for example queries with LIMIT clause can be significantly faster with
> nested loop. But you don't need to disable nested loop globally.
>
> You can wrap your query to sql functions and disable nested loop just
> for these functions.

Thank you for your help, the LIMIT example was something I was not aware of.

The problem is we are replacing an old database, and we need to 
replicate certain views for external users. Minimal impact for these 
users is required. Maybe it would be best to create special user 
accounts for these external users and disable nested loops only for 
those accounts. Otherwise we will disable nested loops when absolutely 
necessary.

  - Anssi



view thread (8+ messages)  latest in thread

Message-ID: <4D833AE8.9020608@thl.fi>
Permalink:  ../4D833AE8.9020608@thl.fi/
Also on:    postgresql.org/message-id/4D833AE8.9020608@thl.fi

 · 

reply

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: anssi.kaariainen@thl.fi, pavel.stehule@gmail.com
  Subject: Re: Disabling nested loops - worst case performance
  In-Reply-To: <4D833AE8.9020608@thl.fi>

* 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