Re: Transaction progress

From: Pablo Yaggi <pyaggi(at)aulamagna(dot)com(dot)ar>
To: Manfred Koizar <mkoi-pg(at)aon(dot)at>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Transaction progress
Date: 2003-01-20 01:23:49
Message-ID: 200301192223.49150.pyaggi@aulamagna.com.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> BTW, you join 35M rows to 10M rows and the planner expects to get only
> 612 rows. Is this realistic? If it is, can you change your
> application to store the "candidates" in a third table as soon as they
> are created? Then you could get a plan like

I expect that the join produce about 4M rows, so I think the planner is
wrong, and about the data, I already have the data and I preparing it
for later processing, so I can't have any original source.

I had also created and index inars_nocontrib_perm1_inx this way:

create index inars_nocontrib_perm1_inx on inars_nocontrib_perm1 (ano,mes,cuil,cuit)

but the planner didn't use it, as you can see. That's the way I broke the config file
before (enable_seqscan=false).

so this is my scenario, the query I need to do is this:

update inars_nocontrib_perm1 set rectificada=TRUE,actividad=b2.actividad,presentacion=b2.presentacion,remuneracion=b2.remuneracion from inars_rectificaciones b2
where inars_nocontrib_perm1.cuil=b2.cuil and inars_nocontrib_perm1.cuit=b2.cuit and inars_nocontrib_perm1.ano=b2.ano and inars_nocontrib_perm1.mes=b2.mes;
where
inars_nocontrib_perm1 is about 35M rows
inars_rectificaciones is about 10M rows
sort memory 4096

based on your experience/calculation, could you give some advice, do I have to increase sort memory ?
do I have to change the query ? ... well something, the query is running from about 28 hours, do I stop it
and try something else ? is there anyway to check how long, even estimated, it will take to finish ?

well thank's a lot for your help, I hope I'm not abusing of it,
Best Regards,
Pablo

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pablo Yaggi 2003-01-20 01:27:02 Re: Transaction progress
Previous Message Manfred Koizar 2003-01-20 00:50:09 Re: Transaction progress