Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z7J1E-0005Cs-PV for pgsql-admin@arkaria.postgresql.org; Tue, 23 Jun 2015 07:53:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Z7J1C-0002sK-PT for pgsql-admin@arkaria.postgresql.org; Tue, 23 Jun 2015 07:53:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z7Iyv-000104-HG for pgsql-admin@postgresql.org; Tue, 23 Jun 2015 07:50:57 +0000 Received: from mailout-afa67.mailout.artfiles.de ([212.72.176.67]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Z7Iys-0007Ne-2I for pgsql-admin@postgresql.org; Tue, 23 Jun 2015 07:50:56 +0000 Received: from p5b325ca2.dip0.t-ipconnect.de ([91.50.92.162] helo=localhost) auth=leo@workfile.de by mailout.artfiles.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80.1) id 1Z7Iyq-0004E9-D7 for pgsql-admin@postgresql.org; Tue, 23 Jun 2015 09:50:52 +0200 Date: Tue, 23 Jun 2015 09:50:45 +0200 From: Rainer Leo Reply-To: Rainer Leo Organization: workfile Datenbankservice X-Priority: 3 (Normal) Message-ID: <133226627.20150623095045@workfile.de> To: pgsql-admin@postgresql.org Subject: Re: pg_upgrade In-Reply-To: References: <1862034146.20150622111438@workfile.de> <5587E6F9.50702@afilias.info> <1102220903.20150622162153@workfile.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----------8F1015E26ACD465" X-Antivirus: avast! (VPS 150622-3, 22.06.2015), Outbound message X-Antivirus-Status: Clean X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org ------------8F1015E26ACD465 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> we are still using PostgreSQL 9.0.2 on Windows Server. >>>>> Now we are migrating to Windows Server 2012 R2 and we >>>>> would like to migrate PostgreSQL at the same time to >>>>> the current version 9.4.4-1 >>>>> Which is the best way to migrate the data? >>>>> 1. pg_dump on the old server >>>>> 2. pg_retore on the new server >>>>> 3. pg_upgrade on the new server >>>>> Is this correct or is there a "best procedure" to do this? >>>> You do either 1 + 2 OR 3. pg_upgrade is binary upgrade, where as >>>> pg_dump + pg_restore is "logical" (dump data and schemal to SQL >>>> instructions). If you go that way also check pg_dumpall for dumping >>>> the globals. >>>> Regards >>>> Jan >>> Also, for 1+2 you would be advised to do the pg_dump/restore using=20 >>> the >>> *new* binaries (9.4), things could get tricky otherwise... >>> Ziggy >> Thanks for your help. >> Using the 9.4 pg_dump on the old server did not work (missing >> libintl-8.dll), so I used the 9.0 pg_dump. >> pg_restore on the new server worked fine, BUT the perfomance is >> lousy, for example a query that took 1732ms on the old server now >> takes longer than 32000ms every time on 9.4 >> I tuned the postgres.conf exactly like the old one, except for more >> RAM in some parameters. >> Does this mean I have to install 9.4 on the old server so I can use >> pg_upgrade? > That won't make a difference regarding resulting performance. > Did you run ANALYZE after pg_restore?=20 Yes=20 =20 > Also, did you run the query more=20 > than once? The new system is "cold" (caches are empty). It will take=20 > some time (depends on your amount of data and RAM, etc) until everything= =20 > is properly loaded. I ran the query more than 10 times. All queries cost more then 32sec. > Did you compare EXPLAIN outputs on both systems (only makes sense after= =20 > running ANALYZE)? EXPLAIN shows that the 9.4 queryplaner has a different plan: OLD (9.0): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D QUERY PLAN Hash Left Join (cost=3D5278.77..14784.76 rows=3D39672 width=3D1305) Hash Cond: (k.lieferbedingungid =3D lb.lieferbedingungid) -> Hash Left Join (cost=3D5277.41..14127.16 rows=3D39672 width=3D1286) Hash Cond: (k.zahlungsbedingungid =3D zb.zahlungsbedingungid) -> Hash Left Join (cost=3D5276.14..13668.47 rows=3D39672 width=3D= 1262) Hash Cond: (k.zahlungsartid =3D za.zahlungsartid) -> Hash Left Join (cost=3D5275.01..13518.55 rows=3D39672 wi= dth=3D1252) Hash Cond: (k.bankverbindungid =3D b.bankverbindungid) -> Hash Left Join (cost=3D4384.74..12159.15 rows=3D39= 672 width=3D1119) Hash Cond: (a.nation_iso =3D n.iso_3166alpha2) -> Hash Left Join (cost=3D4376.21..11605.12 row= s=3D39672 width=3D1105) Hash Cond: ((k.kundengruppeid)::text =3D (k= g.kundengruppeid)::text) -> Hash Left Join (cost=3D4374.94..11058.= 37 rows=3D39672 width=3D1103) Hash Cond: (k.adresseid =3D a.adresse= id) -> Hash Left Join (cost=3D2819.09..= 8758.67 rows=3D39672 width=3D1014) Hash Cond: (a.nation_iso =3D n.= iso_3166alpha2) -> Hash Left Join (cost=3D281= 0.55..8204.64 rows=3D39672 width=3D1003) Hash Cond: (k.kontaktid = =3D ko.kontaktid) -> Hash Left Join (cost= =3D1555.85..5970.69 rows=3D39672 width=3D609) Hash Cond: (k.liefe= radresseid =3D a.adresseid) -> Seq Scan on kun= de k (cost=3D0.00..4051.72 rows=3D39672 width=3D520) -> Hash (cost=3D1= 021.49..1021.49 rows=3D42749 width=3D93) -> Seq Scan = on adresse a (cost=3D0.00..1021.49 rows=3D42749 width=3D93) -> Hash (cost=3D763.20.= .763.20 rows=3D39320 width=3D394) -> Seq Scan on kon= takt ko (cost=3D0.00..763.20 rows=3D39320 width=3D394) -> Hash (cost=3D5.46..5.46 ro= ws=3D246 width=3D14) -> Seq Scan on nation n = (cost=3D0.00..5.46 rows=3D246 width=3D14) -> Hash (cost=3D1021.49..1021.49 ro= ws=3D42749 width=3D93) -> Seq Scan on adresse a (cos= t=3D0.00..1021.49 rows=3D42749 width=3D93) -> Hash (cost=3D1.12..1.12 rows=3D12 widt= h=3D4) -> Seq Scan on kundengruppe kg (cos= t=3D0.00..1.12 rows=3D12 width=3D4) -> Hash (cost=3D5.46..5.46 rows=3D246 width=3D1= 7) -> Seq Scan on nation n (cost=3D0.00..5.4= 6 rows=3D246 width=3D17) -> Hash (cost=3D612.34..612.34 rows=3D22234 width=3D1= 33) -> Seq Scan on bankverbindung b (cost=3D0.00..6= 12.34 rows=3D22234 width=3D133) -> Hash (cost=3D1.06..1.06 rows=3D6 width=3D14) -> Seq Scan on zahlungsart za (cost=3D0.00..1.06 rows= =3D6 width=3D14) -> Hash (cost=3D1.12..1.12 rows=3D12 width=3D28) -> Seq Scan on zahlungsbedingung zb (cost=3D0.00..1.12 rows= =3D12 width=3D28) -> Hash (cost=3D1.16..1.16 rows=3D16 width=3D23) -> Seq Scan on lieferbedingung lb (cost=3D0.00..1.16 rows=3D16 wi= dth=3D23) NEW (9.4): =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D QUERY PLAN Hash Left Join (cost=3D5203.29..12392.94 rows=3D39688 width=3D1292) Hash Cond: (k.lieferbedingungid =3D lb.lieferbedingungid) -> Hash Left Join (cost=3D5201.93..11734.23 rows=3D39688 width=3D1273) Hash Cond: (k.zahlungsbedingungid =3D zb.zahlungsbedingungid) -> Hash Left Join (cost=3D5200.66..11274.37 rows=3D39688 width=3D= 1249) Hash Cond: (k.zahlungsartid =3D za.zahlungsartid) -> Hash Left Join (cost=3D5199.53..11124.40 rows=3D39688 wi= dth=3D1239) Hash Cond: (k.bankverbindungid =3D b.bankverbindungid) -> Hash Left Join (cost=3D4326.26..9781.06 rows=3D396= 88 width=3D1106) Hash Cond: (k.kontaktid =3D ko.kontaktid) -> Hash Left Join (cost=3D3088.45..7563.41 rows= =3D39688 width=3D712) Hash Cond: (a_1.nation_iso =3D n_1.iso_3166= alpha2) -> Hash Left Join (cost=3D3079.91..7009.1= 6 rows=3D39688 width=3D701) Hash Cond: (k.lieferadresseid =3D a_1= .adresseid) -> Hash Left Join (cost=3D1544.86..= 5111.28 rows=3D39688 width=3D612) Hash Cond: (a.nation_iso =3D n.= iso_3166alpha2) -> Hash Left Join (cost=3D153= 6.32..4557.03 rows=3D39688 width=3D598) Hash Cond: (k.adresseid = =3D a.adresseid) -> Hash Left Join (cost= =3D1.27..2277.83 rows=3D39688 width=3D509) Hash Cond: ((k.kund= engruppeid)::text =3D (kg.kundengruppeid)::text) -> Seq Scan on kun= de k (cost=3D0.00..1730.88 rows=3D39688 width=3D507) -> Hash (cost=3D1= .12..1.12 rows=3D12 width=3D4) -> Seq Scan = on kundengruppe kg (cost=3D0.00..1.12 rows=3D12 width=3D4) -> Hash (cost=3D1000.58= ..1000.58 rows=3D42758 width=3D93) -> Seq Scan on adr= esse a (cost=3D0.00..1000.58 rows=3D42758 width=3D93) -> Hash (cost=3D5.46..5.46 ro= ws=3D246 width=3D17) -> Seq Scan on nation n = (cost=3D0.00..5.46 rows=3D246 width=3D17) -> Hash (cost=3D1000.58..1000.58 ro= ws=3D42758 width=3D93) -> Seq Scan on adresse a_1 (c= ost=3D0.00..1000.58 rows=3D42758 width=3D93) -> Hash (cost=3D5.46..5.46 rows=3D246 wid= th=3D14) -> Seq Scan on nation n_1 (cost=3D0= .00..5.46 rows=3D246 width=3D14) -> Hash (cost=3D746.25..746.25 rows=3D39325 wid= th=3D394) -> Seq Scan on kontakt ko (cost=3D0.00..7= 46.25 rows=3D39325 width=3D394) -> Hash (cost=3D595.34..595.34 rows=3D22234 width=3D1= 33) -> Seq Scan on bankverbindung b (cost=3D0.00..5= 95.34 rows=3D22234 width=3D133) -> Hash (cost=3D1.06..1.06 rows=3D6 width=3D14) -> Seq Scan on zahlungsart za (cost=3D0.00..1.06 rows= =3D6 width=3D14) -> Hash (cost=3D1.12..1.12 rows=3D12 width=3D28) -> Seq Scan on zahlungsbedingung zb (cost=3D0.00..1.12 rows= =3D12 width=3D28) -> Hash (cost=3D1.16..1.16 rows=3D16 width=3D23) -> Seq Scan on lieferbedingung lb (cost=3D0.00..1.16 rows=3D16 wi= dth=3D23)=20 I tried REINDEX, it had no effect on the queryplan. > Do the systems differ in any other way, especially storage? The old Server is over 5 years old, so the new hardware is totally=20 differnt: 12 CPU, 64GB RAM, RAID6 on SAS, virtual Hyper-V machine > Jan Any more suggestions? Rainer ------------8F1015E26ACD465 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Re: [ADMIN] pg_upgrade >>>>>  we are still using PostgreSQL 9.0.2 on Windo= ws Server.

>>>>>  Now we are migrating to Windows Server 2012 R2 a= nd we
>>>>>  would like to mig= rate PostgreSQL at the same time to
>>>>>  the current versi= on 9.4.4-1

>>>>>  Which is the best way to migrate the data?

>>>>>  1. pg_dump on the old server
>>>>>  2. pg_retore on the new server
>>>>>  3. pg_upgrade on the new server

>>>>>  Is this correct or is there a "best procedure" t= o do this?

>>>> You do either 1 + 2 OR 3.= pg_upgrade is binary upgrade, where as
>>>> pg_dump + pg_restore is "logical" (dump data and schemal t= o SQL
>>>> instructions). If you go that way also check pg_dumpall fo= r dumping
>>>> the globals.


>>>> Regards

>>>> Jan


>>> Also, for 1+2 you would be ad= vised to do the pg_dump/restore using 
>>> the
>>> *new* binaries (9.4), things could get tricky otherwise...

>>> Ziggy

>> Thanks for your help.

>> Using the 9.4 pg_dump on the old server did not work (missing
= >> libintl-8.dll)= , so I used the 9.0 pg_dump.

>> pg_restore on the new server worked fine, BUT the perfomance is
>> lousy, for example a query that too= k 1732ms on the old server now
>> takes longer than 32000ms every tim= e on 9.4

>> I tuned the postgres.conf exactly like the old one, except for mor= e
>> RAM in some parameters.

>> Does this mean I have to install 9.4 on the old server so I can us= e
>> pg_upgrade?


> That won't make = a difference regarding resulting performance.
> Did you run ANALYZE after pg_restore? 
Yes 
 
> Also, did you run the query more 
> than once? The new system is "cold" (caches are empty). It will take&n= bsp;
> some time (depends on your amount of data and RAM, etc) until everythi= ng 
> is properly loaded.
I ran the query more than 10 times. All queries cost more then 32sec.

> Did you compare EXPLAIN outputs on both systems (only makes sense afte= r 
> running ANALYZE)?
EXPLAIN shows that the 9.4 queryplaner has a different plan:

OLD (9.0):
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
QUERY PLAN
Hash Left Join  (cost=3D5278.77..14784.76 rows=3D39672 width=3D1305)   Hash Cond: (k.lieferbedingungid =3D lb.lieferbedingungid)
  ->  Hash Left Join  (cost=3D5277.41..14127.16 rows=3D39= 672 width=3D1286)
        Hash Cond: (k.zahlungsbedingungid =3D zb.zahlun= gsbedingungid)
        ->  Hash Left Join  (cost=3D5276.1= 4..13668.47 rows=3D39672 width=3D1262)
              Hash Cond: (k.zahlungsarti= d =3D za.zahlungsartid)
              ->  Hash Left Join=  (cost=3D5275.01..13518.55 rows=3D39672 width=3D1252)
                    Hash = Cond: (k.bankverbindungid =3D b.bankverbindungid)
                    ->=  Hash Left Join  (cost=3D4384.74..12159.15 rows=3D39672 width=3D= 1119)
                     = ;     Hash Cond: (a.nation_iso =3D n.iso_3166alpha2)
                     = ;     ->  Hash Left Join  (cost=3D4376.21..11605.12 = rows=3D39672 width=3D1105)
                     = ;           Hash Cond: ((k.kundengruppeid)::text = =3D (kg.kundengruppeid)::text)
                     = ;           ->  Hash Left Join  (cost= =3D4374.94..11058.37 rows=3D39672 width=3D1103)
                     = ;                 Hash Cond: (k.adr= esseid =3D a.adresseid)
                     = ;                 ->  Hash = Left Join  (cost=3D2819.09..8758.67 rows=3D39672 width=3D1014)
                     = ;                     &nb= sp; Hash Cond: (a.nation_iso =3D n.iso_3166alpha2)
                     = ;                     &nb= sp; ->  Hash Left Join  (cost=3D2810.55..8204.64 rows=3D39672 = width=3D1003)
                     = ;                     &nb= sp;       Hash Cond: (k.kontaktid =3D ko.kontaktid)
                     = ;                     &nb= sp;       ->  Hash Left Join  (cost=3D1555.85..= 5970.69 rows=3D39672 width=3D609)
                     = ;                     &nb= sp;             Hash Cond: (k.lieferadresseid= =3D a.adresseid)
                     = ;                     &nb= sp;             ->  Seq Scan on kunde= k  (cost=3D0.00..4051.72 rows=3D39672 width=3D520)
                     = ;                     &nb= sp;             ->  Hash  (cost= =3D1021.49..1021.49 rows=3D42749 width=3D93)
                     = ;                     &nb= sp;                   -> &n= bsp;Seq Scan on adresse a  (cost=3D0.00..1021.49 rows=3D42749 width=3D= 93)
                     = ;                     &nb= sp;       ->  Hash  (cost=3D763.20..763.20 rows= =3D39320 width=3D394)
                     = ;                     &nb= sp;             ->  Seq Scan on konta= kt ko  (cost=3D0.00..763.20 rows=3D39320 width=3D394)
                     = ;                     &nb= sp; ->  Hash  (cost=3D5.46..5.46 rows=3D246 width=3D14)
                     = ;                     &nb= sp;       ->  Seq Scan on nation n  (cost=3D0.0= 0..5.46 rows=3D246 width=3D14)
                     = ;                 ->  Hash =  (cost=3D1021.49..1021.49 rows=3D42749 width=3D93)
                     = ;                     &nb= sp; ->  Seq Scan on adresse a  (cost=3D0.00..1021.49 rows=3D42= 749 width=3D93)
                     = ;           ->  Hash  (cost=3D1.12..1= .12 rows=3D12 width=3D4)
                     = ;                 ->  Seq S= can on kundengruppe kg  (cost=3D0.00..1.12 rows=3D12 width=3D4)
                     = ;     ->  Hash  (cost=3D5.46..5.46 rows=3D246 width= =3D17)
                     = ;           ->  Seq Scan on nation n  = ;(cost=3D0.00..5.46 rows=3D246 width=3D17)
                    ->=  Hash  (cost=3D612.34..612.34 rows=3D22234 width=3D133)
                     = ;     ->  Seq Scan on bankverbindung b  (cost=3D0.00= ..612.34 rows=3D22234 width=3D133)
              ->  Hash  (co= st=3D1.06..1.06 rows=3D6 width=3D14)
                    ->=  Seq Scan on zahlungsart za  (cost=3D0.00..1.06 rows=3D6 width= =3D14)
        ->  Hash  (cost=3D1.12..1.12 rows= =3D12 width=3D28)
              ->  Seq Scan on za= hlungsbedingung zb  (cost=3D0.00..1.12 rows=3D12 width=3D28)
  ->  Hash  (cost=3D1.16..1.16 rows=3D16 width=3D23)
        ->  Seq Scan on lieferbedingung lb &nbs= p;(cost=3D0.00..1.16 rows=3D16 width=3D23)


NEW (9.4):
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
QUERY PLAN
Hash Left Join  (cost=3D5203.29..12392.94 rows=3D39688 width=3D1292)   Hash Cond: (k.lieferbedingungid =3D lb.lieferbedingungid)
  ->  Hash Left Join  (cost=3D5201.93..11734.23 rows=3D39= 688 width=3D1273)
        Hash Cond: (k.zahlungsbedingungid =3D zb.zahlun= gsbedingungid)
        ->  Hash Left Join  (cost=3D5200.6= 6..11274.37 rows=3D39688 width=3D1249)
              Hash Cond: (k.zahlungsarti= d =3D za.zahlungsartid)
              ->  Hash Left Join=  (cost=3D5199.53..11124.40 rows=3D39688 width=3D1239)
                    Hash = Cond: (k.bankverbindungid =3D b.bankverbindungid)
                    ->=  Hash Left Join  (cost=3D4326.26..9781.06 rows=3D39688 width=3D1= 106)
                     = ;     Hash Cond: (k.kontaktid =3D ko.kontaktid)
                     = ;     ->  Hash Left Join  (cost=3D3088.45..7563.41 r= ows=3D39688 width=3D712)
                     = ;           Hash Cond: (a_1.nation_iso =3D n_1.iso= _3166alpha2)
                     = ;           ->  Hash Left Join  (cost= =3D3079.91..7009.16 rows=3D39688 width=3D701)
                     = ;                 Hash Cond: (k.lie= feradresseid =3D a_1.adresseid)
                     = ;                 ->  Hash = Left Join  (cost=3D1544.86..5111.28 rows=3D39688 width=3D612)
                     = ;                     &nb= sp; Hash Cond: (a.nation_iso =3D n.iso_3166alpha2)
                     = ;                     &nb= sp; ->  Hash Left Join  (cost=3D1536.32..4557.03 rows=3D39688 = width=3D598)
                     = ;                     &nb= sp;       Hash Cond: (k.adresseid =3D a.adresseid)
                     = ;                     &nb= sp;       ->  Hash Left Join  (cost=3D1.27..227= 7.83 rows=3D39688 width=3D509)
                     = ;                     &nb= sp;             Hash Cond: ((k.kundengruppeid= )::text =3D (kg.kundengruppeid)::text)
                     = ;                     &nb= sp;             ->  Seq Scan on kunde= k  (cost=3D0.00..1730.88 rows=3D39688 width=3D507)
                     = ;                     &nb= sp;             ->  Hash  (cost= =3D1.12..1.12 rows=3D12 width=3D4)
                     = ;                     &nb= sp;                   -> &n= bsp;Seq Scan on kundengruppe kg  (cost=3D0.00..1.12 rows=3D12 width=3D= 4)
                     = ;                     &nb= sp;       ->  Hash  (cost=3D1000.58..1000.58 ro= ws=3D42758 width=3D93)
                     = ;                     &nb= sp;             ->  Seq Scan on adres= se a  (cost=3D0.00..1000.58 rows=3D42758 width=3D93)
                     = ;                     &nb= sp; ->  Hash  (cost=3D5.46..5.46 rows=3D246 width=3D17)
                     = ;                     &nb= sp;       ->  Seq Scan on nation n  (cost=3D0.0= 0..5.46 rows=3D246 width=3D17)
                     = ;                 ->  Hash =  (cost=3D1000.58..1000.58 rows=3D42758 width=3D93)
                     = ;                     &nb= sp; ->  Seq Scan on adresse a_1  (cost=3D0.00..1000.58 rows=3D= 42758 width=3D93)
                     = ;           ->  Hash  (cost=3D5.46..5= .46 rows=3D246 width=3D14)
                     = ;                 ->  Seq S= can on nation n_1  (cost=3D0.00..5.46 rows=3D246 width=3D14)
                     = ;     ->  Hash  (cost=3D746.25..746.25 rows=3D39325 = width=3D394)
                     = ;           ->  Seq Scan on kontakt ko &nb= sp;(cost=3D0.00..746.25 rows=3D39325 width=3D394)
                    ->=  Hash  (cost=3D595.34..595.34 rows=3D22234 width=3D133)
                     = ;     ->  Seq Scan on bankverbindung b  (cost=3D0.00= ..595.34 rows=3D22234 width=3D133)
              ->  Hash  (co= st=3D1.06..1.06 rows=3D6 width=3D14)
                    ->=  Seq Scan on zahlungsart za  (cost=3D0.00..1.06 rows=3D6 width= =3D14)
        ->  Hash  (cost=3D1.12..1.12 rows= =3D12 width=3D28)
              ->  Seq Scan on za= hlungsbedingung zb  (cost=3D0.00..1.12 rows=3D12 width=3D28)
  ->  Hash  (cost=3D1.16..1.16 rows=3D16 width=3D23)
        ->  Seq Scan on lieferbedingung lb &nbs= p;(cost=3D0.00..1.16 rows=3D16 width=3D23) 


I tried REINDEX, it had no effect on the queryplan.


> Do the systems differ in any other way, especially storage?
The old Server is over 5 years old, so the new hardware is totally 
differnt:  12 CPU, 64GB RAM, RAID6 on SAS, virtual Hyper-V machine

> Jan


Any more suggestions?


Rainer
------------8F1015E26ACD465--