From: Waldomiro <wmiro@shx.com.br>
To: pgsql-jdbc@postgresql.org
Subject: Why is so fast ? is It magic ?
Date: Tue, 18 May 2004 09:46:12 -0300
Message-ID: <001e01c43cd6$1a5d3340$1001a8c0@shx.com.br> (raw)
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.
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-jdbc@postgresql.org
Cc: wmiro@shx.com.br
Subject: Re: Why is so fast ? is It magic ?
In-Reply-To: <001e01c43cd6$1a5d3340$1001a8c0@shx.com.br>
References: <001e01c43cd6$1a5d3340$1001a8c0@shx.com.br>
* 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