Why is so fast ? is It magic ? - Mailing list pgsql-jdbc

From Waldomiro
Subject Why is so fast ? is It magic ?
Date
Msg-id 001e01c43cd6$1a5d3340$1001a8c0@shx.com.br
Whole thread Raw
List 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.
 
 
 

pgsql-jdbc by date:

Previous
From: Clark Kent
Date:
Subject: Are there any compatibility problem with using pg74jdbc3.jar with Postgres 7.3?
Next
From: Oliver Jowett
Date:
Subject: Re: Driver JDBC3 build 213 for postgreSQL 7.4