Re: Subquery WHERE IN or WHERE EXISTS faster?

From: "Sergio Gabriel Rodriguez" <sgrodriguez(at)gmail(dot)com>
To: "Rusty Conover" <rconover(at)infogears(dot)com>
Cc: Ulrich <ulrich(dot)mierendorff(at)gmx(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Subquery WHERE IN or WHERE EXISTS faster?
Date: 2008-07-05 12:02:18
Message-ID: 15aa6b3e0807050502u463c336bva783927eed2e7e89@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi Ulrich, do you try with

SELECT p.speed FROM processor p
INNER JOIN users_processors up ON p.id=up.processorid
AND up.userid=1
?
Or your question is only about IN and EXIST?

regards,

Sergio Gabriel Rodriguez
Corrientes - Argentina
http://www.3trex.com.ar

On Mon, Jun 30, 2008 at 4:44 AM, Rusty Conover <rconover(at)infogears(dot)com> wrote:
>
> On Jun 30, 2008, at 1:29 AM, Ulrich wrote:
>
>> I think it will be fast, because the "IN set", which is the result of
>> "SELECT processorid FROM users_processors WHERE userid=4040", is limited to
>> a maximum of ~500 processors which is not very big. Increasing Postgres' RAM
>> would be difficult for me, because I am only running a very small server
>> with 256MB RAM and the webserver also likes to use some RAM.
>>
>> Does Postgre cache the HASH-Table for later use? For example when the user
>> reloads the website.
>>
>
> No the hash table only lives as long as the query is being executed. If
> you're looking for generic caching, I'd suggest memcached may be able to
> fill your needs.
>
> Cheers,
>
> Rusty
> --
> Rusty Conover
> InfoGears Inc.
> http://www.infogears.com
>
>
>
>
>
>
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Sergio Gabriel Rodriguez 2008-07-05 12:14:05 Re: Subquery WHERE IN or WHERE EXISTS faster?
Previous Message Jessica Richard 2008-07-05 11:24:49 How much work_mem to configure...