Re: Abnormal performance difference between Postgres and MySQL

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
Cc: Farhan Husain <russoue(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Abnormal performance difference between Postgres and MySQL
Date: 2009-02-23 23:37:04
Message-ID: dcc563d10902231537w4099091aw78688d818c1378f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Feb 23, 2009 at 4:33 PM, Guillaume Smet
<guillaume(dot)smet(at)gmail(dot)com> wrote:
> On Tue, Feb 24, 2009 at 12:27 AM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> wrote:
>> If it's not C then string compares are going to probably need special
>> indexes to work the way you expect them. (varchar pattern ops). Look
>> here for more information:
>>
>> http://www.postgresql.org/docs/8.3/static/indexes-opclass.html
>
> It's only relevant for pattern matching (eg LIKE or regexp). AFAICS,
> the OP only uses plain equals in his query.

True, I had a bit of a headache trying to read that unindented query.
(OP here's a hint, if you want people to read your queries / code,
indent it in some way that makes it fairly readable Note that
varchar_pattern_ops indexes can't be used for straight equal compares
either.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2009-02-23 23:38:27 Re: Abnormal performance difference between Postgres and MySQL
Previous Message Farhan Husain 2009-02-23 23:35:21 Re: Abnormal performance difference between Postgres and MySQL