pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Benjamin Minshall <minshall@intellicon.biz>
To: zardozrocks <zardozrocks@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Simple query, 10 million records...MySQL ten times faster
Date: Thu, 26 Apr 2007 17:12:57 -0400
Message-ID: <463115D9.5040403@intellicon.biz> (raw)
In-Reply-To: <1177450006.547698.120920@u32g2000prd.googlegroups.com>
References: <1177450006.547698.120920@u32g2000prd.googlegroups.com>

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@intellicon.biz>
Senior Developer -- Intellicon, Inc.

Attachments:

  smime.p7s (application/x-pkcs7-signature, 5.1K) download

view thread (11+ messages)  latest in thread

Message-ID: <463115D9.5040403@intellicon.biz>
Permalink:  ../463115D9.5040403@intellicon.biz/
Also on:    postgresql.org/message-id/463115D9.5040403@intellicon.biz

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: minshall@intellicon.biz, zardozrocks@gmail.com
  Subject: Re: Simple query, 10 million records...MySQL ten times faster
  In-Reply-To: <463115D9.5040403@intellicon.biz>

* 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