Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id D57CB9FBAE1 for ; Tue, 12 Jun 2007 14:45:55 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 11828-01-10 for ; Tue, 12 Jun 2007 14:45:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from cat.bucknet.co.za (cat.bucknet.co.za [196.211.0.10]) by postgresql.org (Postfix) with ESMTP id 4E9ED9FB5B7 for ; Tue, 12 Jun 2007 14:45:43 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by cat.bucknet.co.za (Postfix) with ESMTP id 592482380BC; Tue, 12 Jun 2007 19:45:24 +0200 (SAST) X-Virus-Scanned: by cat at bucknet.co.za Received: from cat.bucknet.co.za ([127.0.0.1]) by localhost (cat.bucknet.co.za [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SrkPn82fRhyj; Tue, 12 Jun 2007 19:45:16 +0200 (SAST) Received: from fusion.bucknet.co.za (ns3.bucknet.co.za [196.38.143.226]) by cat.bucknet.co.za (Postfix) with ESMTP id 3C4AD23809E; Tue, 12 Jun 2007 19:45:16 +0200 (SAST) Received: from localhost (unknown [127.0.0.1]) by fusion.bucknet.co.za (Postfix) with ESMTP id 019A2C1403B; Tue, 12 Jun 2007 19:45:32 +0200 (SAST) X-Virus-Scanned: by Fusion at bucknet.co.za Received: from fusion.bucknet.co.za ([127.0.0.1]) by localhost (fusion.bucknet.co.za [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GOXvuMeweyPm; Tue, 12 Jun 2007 19:45:29 +0200 (SAST) Received: from [10.0.0.6] (unknown [196.25.216.139]) by fusion.bucknet.co.za (Postfix) with ESMTP id 15943C14029; Tue, 12 Jun 2007 19:45:28 +0200 (SAST) Message-ID: <466EDD7C.5090807@mecola.com> Date: Tue, 12 Jun 2007 19:53:00 +0200 From: Christo Du Preez User-Agent: Thunderbird 1.5.0.10 (X11/20060911) MIME-Version: 1.0 To: Tom Lane CC: pgsql-performance@postgresql.org Subject: Re: test / live environment, major performance difference References: <466EA078.20601@mecola.com> <8385.1181664586@sss.pgh.pa.us> <466ED0E4.3040803@mecola.com> <19136.1181669869@sss.pgh.pa.us> In-Reply-To: <19136.1181669869@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.594 tagged_above=0 required=5 tests=AWL=-1.204, BAYES_50=0.001, RCVD_IN_SORBS_WEB=1.456, WEIRD_QUOTING=1.341 X-Spam-Level: * X-Archive-Number: 200706/221 X-Sequence-Number: 25254 Fast: "public";"layertype";"id";0;4;-1;"";"";"{1,442,508,575,641,708,774,840,907,973,1040}";0.999995 "public";"layertype";"label";0;14;-0.971429;"{arch,bank,bench,canyon,gap,hill,hills,levee,mountain,mountains}";"{0.00300752,0.00300752,0.00300752,0.00300752,0.00300752,0.00300752,0.00300752,0.00300752,0.00300752,0.00300752}";"{"abandoned airfield",boatyard,corridor,forest(s),"intermittent lake","metro station","park headquarters",reefs,"section of bank",swamp,zoo}";0.107307 "public";"layertype";"parentid";0.98797;4;2;"{4,1}";"{0.00902256,0.00300752}";"";-0.142857 "public";"layertype";"zorder";0;4;9;"{0}";"{0.98797}";"{1,2,3,4,5,6,7,8}";0.928955 "public";"layertype";"description";0.100752;74;-0.888722;"{"a branch of a canyon or valley","a low, isolated, rounded hill","a near-level shallow, natural depression or basin, usually containing an intermittent lake, pond, or pool","a relatively shallow, wide depression, the bottom of which usually has a continuous gradient","a shore zone of coarse unconsolidated sediment that extends from the low-water line to the highest reach of storm waves","a surface-navigation hazard composed of consolidated material","a surface-navigation hazard composed of unconsolidated material"}";"{0.00300752,0.00300752,0.00300752,0.00300752,0.00300752,0.00300752,0.00300752}";"{"a barrier constructed across a stream to impound water","a comparatively depressed area on an icecap","a facility for pumping oil through a pipeline","a large house, mansion, or chateau, on a large estate","an area drained by a stream","an elongate (tongue-like) extension of a flat sea floor into an adjacent higher feature","a place where caravans stop for rest","a series of associated ridges or seamounts","a sugar mill no longer used as a sugar mill","bowl-like hollows partially surrounded by cliffs or steep slopes at the head of a glaciated valley","well-delineated subdivisions of a large and complex positive feature"}";-0.0178932 "public";"layertype";"code";0.0135338;9;-1;"";"";"{A.ADM1,H.HBRX,H.STMM,L.RGNL,S.BUSTN,S.HTL,S.PKLT,S.TRIG,T.MTS,U.GAPU,V.VINS}";0.995628 Slow: "public";"layertype";"id";0;4;-1;"";"";"{1,437,504,571,638,705,772,839,906,973,1040}";-0.839432 "public";"layertype";"label";0;15;-0.965723;"{arch,bank,bench,canyon,country,gap,hill,hills,levee,mountain}";"{0.00298063,0.00298063,0.00298063,0.00298063,0.00298063,0.00298063,0.00298063,0.00298063,0.00298063,0.00298063}";"{"abandoned airfield",boatyard,"cotton plantation",fork,"intermittent oxbow lake","military installation","park headquarters",reef,"second-order administrative division",swamp,zoo}";-0.0551452 "public";"layertype";"parentid";0.00745157;4;7;"{300}";"{0.976155}";"{1,1,4,5,8,12}";0.92262 "public";"layertype";"zorder";0;4;8;"{0}";"{0.971684}";"{1,2,3,3,5,7,7}";0.983028 "public";"layertype";"description";0.110283;74;-0.879285;"{"a branch of a canyon or valley","a low, isolated, rounded hill","a near-level shallow, natural depression or basin, usually containing an intermittent lake, pond, or pool","a relatively shallow, wide depression, the bottom of which usually has a continuous gradient","a shore zone of coarse unconsolidated sediment that extends from the low-water line to the highest reach of storm waves","a surface-navigation hazard composed of consolidated material","a surface-navigation hazard composed of unconsolidated material"}";"{0.00298063,0.00298063,0.00298063,0.00298063,0.00298063,0.00298063,0.00298063}";"{"a barrier constructed across a stream to impound water","a comparatively depressed area on an icecap","a facility for pumping water from a major well or through a pipeline","a large inland body of standing water","an area drained by a stream","an embankment bordering a canyon, valley, or seachannel","a place where diatomaceous earth is extracted","a series of associated ridges or seamounts","a sugar mill no longer used as a sugar mill","bowl-like hollows partially surrounded by cliffs or steep slopes at the head of a glaciated valley","well-delineated subdivisions of a large and complex positive feature"}";0.0103485 "public";"layertype";"code";0.023845;9;-1;"";"";"{A.ADM1,H.INLT,H.STMM,L.RNGA,S.BUSTN,S.HUT,S.PKLT,S.TRIG,T.MTS,U.GAPU,V.VINS}";-0.852108 This table contains identical data. Thanx for your help Tom Tom Lane wrote: > Christo Du Preez writes: > >> Yes, I have just about tried every combination of vacuum on the >> database. Just to make 100% sure. >> > > Well, there's something mighty wacko about that rowcount estimate; > even if you didn't have stats, the estimate for a simple equality > constraint oughtn't be 100% match. > > What do you get from SELECT * FROM pg_stats WHERE tablename = 'layertype' > on both systems? > > regards, tom lane > > > -- Christo Du Preez Senior Software Engineer Mecola IT Mobile: +27 [0]83 326 8087 Skype: christodupreez Website: http://www.locateandtrade.co.za