pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ing. Gabriel Monsalvo <gmonsalvo@rentastucuman.gov.ar>
To: pgsql-admin@postgresql.org
Subject: Slow Executing queries
Date: Tue, 17 Dec 2002 20:03:33 -0300
Message-ID: <200212172303.gBHN3XF26865@ar16.toservers.com> (raw)

<FONT face="Courier New">Tom:<BR><BR>We have a IBM NetServer i with 2.5 GB
de Ram and RAID 5 with 137 GB, two<BR>PIV Xeon at 1.6 GHZ... I mounted Linux
in this server with<BR>PostgreSQL 7.3, we start to deploy the database and
we have a lot of<BR>performance problems, i need help for tune up the
server....i read the faqs,<BR>a lots of documents about gets better
performance but i don't obtain good<BR>results...for example this table:
OBLIGACION have 15 millions of records<BR><BR>Column | Type |
Modifiers<BR>----------+-----------------------+-----------<BR>cuil |
numeric(11,0) |<BR>objeto | character varying(11) |<BR>impuesto |
numeric(3,0) |<BR>concepto | numeric(3,0) |<BR>tipobj | numeric(3,0)
|<BR>fecvtop | date |<BR>fecvtod | date |<BR>graba | date |<BR>fecgen | date
|<BR>hora | character varying(4) |<BR>operador | character varying(10)
|<BR>numoble | numeric(13,0) |<BR>puesto | numeric(3,0) |<BR>secsec |
numeric(4,0) |<BR>periodo | numeric(6,0) |<BR>cuota | numeric(3,0)
|<BR>ctrlpago | numeric(3,0) |<BR>ddjjd | numeric(3,0) |<BR>tipopp |
numeric(4,0) |<BR>nroppago | numeric(8,0) |<BR>marca | numeric(3,0)
|<BR>Indexes: numoble_oblig btree (numoble),<BR>objeto_oblig btree
(objeto),<BR>periodo_oblig btree (periodo)<BR><BR>sapym=# explain select
max(numoble) from obligacion where periodo=200100;<BR>QUERY
PLAN<BR>----------------------------------------------------------------------------<BR>-----------------------<BR>Aggregate
(cost=6983070.47..6983070.47 rows=1 width=16)<BR>-&gt; Index Scan using
periodo_oblig on obligacion (cost=0.00..6978186.18<BR>rows=1953717
width=16)<BR>Index Cond: (periodo = 200100::numeric)<BR>(3
rows)<BR><BR>&gt;&gt; there is a index for obligacion on periodo but this
query takes over 2<BR>minutes for finish.<BR><BR><BR>sapym=# explain select
count(*) from obligacion where periodo=200100;<BR>QUERY
PLAN<BR>----------------------------------------------------------------------------<BR>----------------------<BR>Aggregate
(cost=6983070.47..6983070.47 rows=1 width=0)<BR>-&gt; Index Scan using
periodo_oblig on obligacion (cost=0.00..6978186.18<BR>rows=1953717
width=0)<BR>Index Cond: (periodo = 200100::numeric)<BR>(3 rows)<BR><BR>can
you help to solve the problem? i really want to use PostgreSQL in
my<BR>organization but if i can't solve this problem we must<BR>migrate to
ugly DB2 .<BR><BR>thanks in advance.<BR><BR>Gabriel
Monsalvo</FONT><BR><BR><br><br><br><br>
<br>
________________________________________________________________________<br><br>
<font name=verdana> Este Mail Ha sido enviado por <a
href='http://www.correomovil.com.ar'><b>CorreoMovil</b></a; - Su cuenta POP
este donde este</font><br>
<br>




view thread (2+ messages)  latest in thread

Message-ID: <200212172303.gBHN3XF26865@ar16.toservers.com>
Permalink:  ../200212172303.gBHN3XF26865@ar16.toservers.com/
Also on:    postgresql.org/message-id/200212172303.gBHN3XF26865@ar16.toservers.com

 · 

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-admin@postgresql.org
  Cc: gmonsalvo@rentastucuman.gov.ar
  Subject: Re: Slow Executing queries
  In-Reply-To: <200212172303.gBHN3XF26865@ar16.toservers.com>
  References: <200212172303.gBHN3XF26865@ar16.toservers.com>

* 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