pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Myrta <jasiek@klaster.net>
To: pgsql-performance@postgresql.org
Subject: Re: Same query, same performance
Date: Thu, 23 Jan 2003 09:20:09 +0100
Message-ID: <3E2FA5B9.1030105@klaster.net> (raw)
In-Reply-To: <10635.200.225.202.15.1043288804.squirrel@webmail.ad2.com.br>
References: <10635.200.225.202.15.1043288804.squirrel@webmail.ad2.com.br>

alexandre :: aldeia digital wrote:

>Hi all,
>
>First, sorry for the long mail...
>
>I have a system with 7 Million of records in 600 tables.
>My actual production machine is: P4 1.6G, 3 IDE 7200, 1GB PC133
>My new machine production is: Dual Xeon 2.0G HT, 1GB DDR266 ECC
>3 SCSI with HW Raid 5
>
>The postgresql.conf is the SAME in both systems and I test
>with no other connections, only my local test.
>
>shared_buffers = 80000
>effective_cache_size = 60000
>random_page_cost = 2.5
>cpu_tuple_cost = 0.001
>cpu_index_tuple_cost = 0.0001
>cpu_operator_cost = 0.00025
>
>My question is:
>
>If I execute the same query executed a lot of times, the
>duration is praticaly the same in both systems ?
>
>1) !       1.185424 elapsed 1.090000 user 0.100000 system sec
>2) !       1.184415 elapsed 1.070000 user 0.120000 system sec
>3) !       1.185209 elapsed 1.100000 user 0.080000 system sec
>
>If the disks is not read directly, the system must find
>the rows in RAM. If it find in RAM, why so diffrents machines
>have the times of execution and why the times does not down ???

Here is your problem:
->  Seq Scan on fn06t t1  (cost=0.00..25808.30 rows=15 width=95)
               Filter: ((fn06emp07 = 1::smallint) AND (fn06tiptit =
'R'::bpchar) AND (fn06titban = '002021001525               
  '::bpchar))

Problably system has to read from disk whole table fn06t each time, beacuse it
doesn't use index scan.

Do you have any indexes on table fn06t? How selective are conditions above
How big is this table? Can you use indexes on multiple fields on this table 
- it should help, because conditions above return only 15 rows?

Regards,
Tomasz Myrta






view thread (5+ messages)  latest in thread

Message-ID: <3E2FA5B9.1030105@klaster.net>
Permalink:  ../3E2FA5B9.1030105@klaster.net/
Also on:    postgresql.org/message-id/3E2FA5B9.1030105@klaster.net

 · 

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 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-performance@postgresql.org
  Cc: jasiek@klaster.net
  Subject: Re: Same query, same performance
  In-Reply-To: <3E2FA5B9.1030105@klaster.net>
  References: <10635.200.225.202.15.1043288804.squirrel@webmail.ad2.com.br> <3E2FA5B9.1030105@klaster.net>

* 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