Why is so fast ? is It magic ?

From: "Waldomiro" <wmiro(at)shx(dot)com(dot)br>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Why is so fast ? is It magic ?
Date: 2004-05-18 12:46:12
Message-ID: 001e01c43cd6$1a5d3340$1001a8c0@shx.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

I'm testing how fast PostgreSql is.

I have 2 tables :

the first one has 87000 records and the second one has 8700.

this is my code :

BEGIN;

DECLARE CURSOR TEST FOR SELECT FIELD1,FIELD2,FIELD3 FROM TABLE1
LEFT JOIN TABLE2 ON FIELD1 = FIELD2
ORDER BY FIELD3

FETCH 10 IN TEST;
FETCH 10 IN TEST;
FETCH 10 IN TEST;
FETCH 10 IN TEST; ....(continue up to the last record)

The FIELD3 is a Char FIELD in the second table and It's not indexed.

This test results in 87000 records ordered by a field on a second table which doesn't have an index.

It's take only 40 seconds in a Pentium IV 2.4 GHZ with 512MB.

How postgres does that so fast ?

Am I doing something wrong or It's really fast ?

Thanks.

wmiro.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Olivier Hubaut 2004-05-18 13:51:57 Parsing problem when launching SQL files with Ant (through JDBC driver)
Previous Message Dave Cramer 2004-05-18 12:18:56 Re: patch for getUDT