Re: More grist for the PostgreSQL vs MySQL mill - Mailing list pgsql-general

From Chris
Subject Re: More grist for the PostgreSQL vs MySQL mill
Date
Msg-id 45B42CC0.70402@gmail.com
Whole thread Raw
In response to Re: More grist for the PostgreSQL vs MySQL mill  ("Shashank Tripathi" <shashank.tripathi@gmail.com>)
Responses Re: More grist for the PostgreSQL vs MySQL mill  ("Peter Rosenthal" <voiperster@gmail.com>)
List pgsql-general
Shashank Tripathi wrote:
>> select something from othertable;
>> select * from table where table_id in (?, ?, ?, ?, ?, ?, ?, ...)
>
>
> This is what MySQL's CEO Martin said in an interview on Slashdot. If
> we can manage two queries as above through, say, a PHP application,
> with each executing in 0.004 seconds, then an optimized subquery needs
> to be beat the 0.008 mark to be a viable alternative.

Not really.

If you have too many values, you have problems.. eg the "select
something from table" returns 100+ records (for example, don't have a
concrete number), you'll run into this problem:

http://dev.mysql.com/doc/refman/4.1/en/packet-too-large.html

when you try to put them all in the 'in' clause in the 2nd query.

But as you say not usually a problem in most cases but something you
need to be aware of (and you're only aware of it once you've been bitten
by it heh).

--
Postgresql & php tutorials
http://www.designmagick.com/

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: More grist for the PostgreSQL vs MySQL mill
Next
From: gustavo halperin
Date:
Subject: can't CREATE TRIGGER