Re: Simple query, 10 million records...MySQL ten times faster

From: "Alexander Staubo" <alex(at)purefiction(dot)net>
To: zardozrocks <zardozrocks(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Simple query, 10 million records...MySQL ten times faster
Date: 2007-04-26 23:14:34
Message-ID: 88daf38c0704261614o5f367f2fyb7087d37f1eb64ce@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 4/27/07, Alexander Staubo <alex(at)purefiction(dot)net> wrote:
[snip]
> PostGIS implements the whole GIS stack, and it's so good at this that
> it's practically the de facto tool among GIS analysts. Installing
> PostGIS into a database is simple, and once you have done this, you
> can augment your table with a geometry (*):
>
> alter table test_zip_assoc add column lonlat geometry;

I forgot to include the crucial step, of course:

create index test_zip_assoc_lonlat_index on test_zip_assoc
using gist (lonlat gist_geometry_ops);
analyze test_zip_assoc_lonlat;

This creates a GiST index on the geometry and (significantly) updates
the table statistics.

Alexander.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2007-04-27 01:26:53 Re: postgres: 100% CPU utilization
Previous Message Alexander Staubo 2007-04-26 23:12:31 Re: Simple query, 10 million records...MySQL ten times faster