Re: slow building index and reference after Sybase to Pg - Mailing list pgsql-general

From Gary Fu
Subject Re: slow building index and reference after Sybase to Pg
Date
Msg-id 4D6C256D.4010904@sigmaspace.com
Whole thread Raw
In response to Re: slow building index and reference after Sybase to Pg  (Andy Colson <andy@squeakycode.net>)
List pgsql-general
  On 02/28/11 17:32, Andy Colson wrote:
>>>
>>>
>> Here are the more test results on the 3rd ref and parallel on 2nd and
>> 3rd references:
>>
>> 325 mins on FK_FM_ALL_REF_FILE (334 mins previous)
>>
>> parallel results on 2nd and 3rd references: (much worse on 2nd ref)
>>
>>
>
>> Here are some information on my system:
>>
>> 1:07pm 20 gfu@moddblads:/dump/gfu> free -m (48MB of memory)
>> total used free shared buffers cached
>> Mem: 48036 47867 168 0 294 46960
>>
>> 1:08pm 21 gfu@moddblads:/dump/gfu> hinv
>> Total CPU's: 24
>> Intel(R) Xeon(R) CPU X5660 @ 2.80GHz 2793 MHZ
>> Cache Size: 12288 KB
>>
>
> Huh.  Dunno.  Ah, how about locks?
>
> while its building a reference, look at pg_locks (select * from
> pg_locks).
>
> Looking at the build times:
> > 610 mins on FK_EXPORT_FILES_REF_FILE (??? almost double the time)
> > 340 mins on FK_FM_ALL_REF_FILE
>
> looks like the first one ran and the second waited for it to complete
> before it ran.
>
> Are those two touching the same tables?
>
> -Andy
>
There are no other processes running on the db when the reference is
rebuilt.

Yes, they are reference to the same table and the 1st one must lock the
table before the 2nd one can run.

Gary

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: Transactions and ID's generated by triggers
Next
From: Adrian Klaver
Date:
Subject: Re: Lock ACCESS EXCLUSIVE and Select question !