Slow Executing queries

Поиск
Список
Период
Сортировка
От Ing. Gabriel Monsalvo
Тема Slow Executing queries
Дата
Msg-id 200212172303.gBHN3XF26865@ar16.toservers.com
обсуждение исходный текст
Список pgsql-admin
<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
/>PIVXeon at 1.6 GHZ... I mounted Linux in this server with<br />PostgreSQL 7.3, we start to deploy the database and we
havea lot of<br />performance problems, i need help for tune up the server....i read the faqs,<br />a lots of documents
aboutgets better performance but i don't obtain good<br />results...for example this table: OBLIGACION have 15 millions
ofrecords<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 />-> 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
/>>>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 />-> 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
/>canyou help to solve the problem? i really want to use PostgreSQL in my<br />organization but if i can't solve this
problemwe 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
/><fontname="verdana"> Este Mail Ha sido enviado por <a href="http://www.correomovil.com.ar"><b>CorreoMovil</b></a> -
Sucuenta POP este donde este</font><br /><br /> 

В списке pgsql-admin по дате отправления:

Предыдущее
От: Andreas Schuldei
Дата:
Сообщение: how to dump and restore unicode databases?
Следующее
От: Arindam Haldar
Дата:
Сообщение: unsubscribe