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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2006-05-30 22:38:18 Re: INSERT OU UPDATE WITHOUT SELECT?
Previous Message PFC 2006-05-30 22:35:15 Re: INSERT OU UPDATE WITHOUT SELECT?