Skip site navigation (1) Skip section navigation (2)

Re: Optimizing a huge_table/tiny_table join

From: PFC <lists(at)peufeu(dot)com>
To: kynn(at)panix(dot)com, pgsql-performance(at)postgresql(dot)org
Subject: Re: Optimizing a huge_table/tiny_table join
Date: 2006-05-30 22:37:03
Message-ID: op.tadyf1jicigqcu@apollo13 (view raw or flat)
Thread:
Lists: pgsql-performance
> 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.

In response to

pgsql-performance by date

Next:From: Alvaro HerreraDate: 2006-05-30 22:38:18
Subject: Re: INSERT OU UPDATE WITHOUT SELECT?
Previous:From: PFCDate: 2006-05-30 22:35:15
Subject: Re: INSERT OU UPDATE WITHOUT SELECT?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group