pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@peufeu.com>
To: kynn@panix.com
To: pgsql-performance@postgresql.org
Subject: Re: Optimizing a huge_table/tiny_table join
Date: Wed, 31 May 2006 00:37:03 +0200
Message-ID: <op.tadyf1jicigqcu@apollo13> (raw)
In-Reply-To: <200605241742.k4OHgkg06460@panix3.panix.com>
References: <200605241742.k4OHgkg06460@panix3.panix.com>


> SELECT * FROM huge_table h, tiny_table t WHERE UPPER( h.id ) =  
> UPPER( t.id )

	What about :

SELECT * FROM huge_table h WHERE UPPER(id) IN (SELECT upper(id) FROM  
tiny_table t)

	Or, try opening a cursor on your original query and using FETCH. It might  
result in a different plan.
	Or lower random_page_cost.



view thread (12+ messages)

Message-ID: <op.tadyf1jicigqcu@apollo13>
Permalink:  ../op.tadyf1jicigqcu@apollo13/
Also on:    postgresql.org/message-id/op.tadyf1jicigqcu@apollo13

 · 

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: lists@peufeu.com, kynn@panix.com
  Subject: Re: Optimizing a huge_table/tiny_table join
  In-Reply-To: <op.tadyf1jicigqcu@apollo13>

* 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