Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CC19A9FA3A7 for ; Tue, 12 Jun 2007 10:26:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 36982-07 for ; Tue, 12 Jun 2007 10:26:08 -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 2E6369FA273 for ; Tue, 12 Jun 2007 10:26:07 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by cat.bucknet.co.za (Postfix) with ESMTP id B6BC923807C for ; Tue, 12 Jun 2007 15:25:47 +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 uRfI-SG9IjyU for ; Tue, 12 Jun 2007 15:25:40 +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 9A17D23AEF6 for ; Tue, 12 Jun 2007 15:24:53 +0200 (SAST) Received: from localhost (unknown [127.0.0.1]) by fusion.bucknet.co.za (Postfix) with ESMTP id 92C56C14036 for ; Tue, 12 Jun 2007 15:25:08 +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 K8SFQ1yy7rpZ for ; Tue, 12 Jun 2007 15:25:07 +0200 (SAST) Received: from [10.0.0.6] (unknown [196.25.216.139]) by fusion.bucknet.co.za (Postfix) with ESMTP id 4568EC1403B for ; Tue, 12 Jun 2007 15:25:06 +0200 (SAST) Message-ID: <466EA078.20601@mecola.com> Date: Tue, 12 Jun 2007 15:32:40 +0200 From: Christo Du Preez User-Agent: Thunderbird 1.5.0.10 (X11/20060911) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: test / live environment, major performance difference 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=0.574 tagged_above=0 required=5 tests=AWL=-0.883, BAYES_50=0.001, RCVD_IN_SORBS_WEB=1.456 X-Spam-Level: X-Archive-Number: 200706/201 X-Sequence-Number: 25234 Good day, I have noticed that my server never uses indexing. No matter what I do. As an example I took a table with about 650 rows, having a parentid field with an index on parentid. EXPLAIN ANALYZE SELECT * FROM layertype where parentid = 300; On my laptop the explain analyze looks like this: "Index Scan using fki_layertype_parentid on layertype (cost=0.00..8.27 rows=1 width=109)" " Index Cond: (parentid = 300)" and on the problem server: "Seq Scan on layertype (cost=0.00..20.39 rows=655 width=110)" " Filter: (parentid = 300)" ......... I have dropped the index, recreated it, vacuumed the table, just about everything I could think of, And there is just no way I can get the query planner to use the index. PostgreSQL 8.2.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) POSTGIS="1.2.1" GEOS="3.0.0rc4-CAPI-1.3.3" PROJ="Rel. 4.5.0, 22 Oct 2006" USE_STATS