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

From: Benjamin Minshall <minshall(at)intellicon(dot)biz>
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 21:12:57
Message-ID: 463115D9.5040403@intellicon.biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

zardozrocks wrote:
> lat_radians numeric(6,5) DEFAULT 0.00000 NOT NULL,
> long_radians numeric(6,5) DEFAULT 0.00000 NOT NULL

Native data types such as integer or real are much faster than numeric.
If you need 6 digits, it's better to multiply your coordinates by 10^6
and store as INTEGER.

> On my development server (dual proc/dual core Opteron 2.8 Ghz with 4GB
> ram) this query averages 1.5 seconds each time it runs after a brief
> warmup period. In PostGreSQL it averages about 15 seconds.

What hard drive(s) and controller(s) do you have? Please post EXPLAIN
ANALYZE output of the problem query and your postgresql.conf also.

--
Benjamin Minshall <minshall(at)intellicon(dot)biz>
Senior Developer -- Intellicon, Inc.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Luke Lonergan 2007-04-26 21:39:56 Re: Simple query, 10 million records...MySQL ten times faster
Previous Message Bill Moran 2007-04-26 21:11:38 Re: Simple query, 10 million records...MySQL ten times faster