pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Staubo <alex@purefiction.net>
To: zardozrocks <zardozrocks@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Simple query, 10 million records...MySQL ten times faster
Date: Fri, 27 Apr 2007 01:14:34 +0200
Message-ID: <88daf38c0704261614o5f367f2fyb7087d37f1eb64ce@mail.gmail.com> (raw)
In-Reply-To: <88daf38c0704261612o741b67bvd380484cb38b814d@mail.gmail.com>
References: <1177450006.547698.120920@u32g2000prd.googlegroups.com>
	<88daf38c0704261612o741b67bvd380484cb38b814d@mail.gmail.com>

On 4/27/07, Alexander Staubo <alex@purefiction.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.



view thread (11+ messages)  latest in thread

Message-ID: <88daf38c0704261614o5f367f2fyb7087d37f1eb64ce@mail.gmail.com>
Permalink:  ../88daf38c0704261614o5f367f2fyb7087d37f1eb64ce@mail.gmail.com/
Also on:    postgresql.org/message-id/88daf38c0704261614o5f367f2fyb7087d37f1eb64ce@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: alex@purefiction.net, zardozrocks@gmail.com
  Subject: Re: Simple query, 10 million records...MySQL ten times faster
  In-Reply-To: <88daf38c0704261614o5f367f2fyb7087d37f1eb64ce@mail.gmail.com>
  References: <1177450006.547698.120920@u32g2000prd.googlegroups.com> <88daf38c0704261612o741b67bvd380484cb38b814d@mail.gmail.com> <88daf38c0704261614o5f367f2fyb7087d37f1eb64ce@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox