Re: Transaction progress - Mailing list pgsql-general

From Pablo Yaggi
Subject Re: Transaction progress
Date
Msg-id 200301192223.49150.pyaggi@aulamagna.com.ar
Whole thread Raw
In response to Re: Transaction progress  (Manfred Koizar <mkoi-pg@aon.at>)
Responses Re: Transaction progress
List 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.remuneracionfrom
inars_rectificacionesb2  
    where inars_nocontrib_perm1.cuil=b2.cuil and inars_nocontrib_perm1.cuit=b2.cuit and
inars_nocontrib_perm1.ano=b2.anoand 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



pgsql-general by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: Transaction progress
Next
From: Pablo Yaggi
Date:
Subject: Re: Transaction progress