Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dR1wO-00019l-Jy for pgsql-performance@arkaria.postgresql.org; Fri, 30 Jun 2017 19:50:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dR1wO-0002v4-3r for pgsql-performance@arkaria.postgresql.org; Fri, 30 Jun 2017 19:50:56 +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_2) (envelope-from ) id 1dR1wN-0002uv-OW for pgsql-performance@postgresql.org; Fri, 30 Jun 2017 19:50:55 +0000 Received: from mailout02.ims-firmen.de ([213.174.32.97]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dR1wG-0004Xe-FG for pgsql-performance@postgresql.org; Fri, 30 Jun 2017 19:50:55 +0000 Received: from mailin04.ims-firmen.de ([192.168.1.144]) by mailout02.ims-firmen.de with esmtp (envelope-from ) id 1dR1wE-0006Co-mI; Fri, 30 Jun 2017 21:50:46 +0200 Received: from [94.30.52.94] (helo=[10.5.50.130]) by mailin04.ims-firmen.de with esmtpsa (UNKNOWN:DHE-RSA-AES256-GCM-SHA384:256) (envelope-from ) id 1dR1wE-00042V-C8; Fri, 30 Jun 2017 21:50:46 +0200 Date: Fri, 30 Jun 2017 20:50:45 +0100 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Simple SQL too slow To: pgsql-performance@postgresql.org,Daviramos Roussenq Fortunato From: Andreas Kretschmer Message-ID: List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 30 June 2017 20:14:33 GMT+01:00, Daviramos Roussenq Fortunato wrote: >Hi List, > >I have a Server where a simple SQL is taking a long time to return the >results the Server settings are as follows: > >Debian GNU/Linux 7 (wheezy) >CPU: Intel(R) Xeon(R) CPU E5405 @ 2.00GHz >Mem: 16GB >HD: SSG 120 GB >Postgresql 9.2 > >postgresql.conf >shared_buffers =3D 1536MB >work_mem =3D 32MB >maintenance_work_mem =3D 960MB >effective_cache_size =3D 4864MB > >I did a test with the following SQL: > >select * from MINHATABELA > > >It took 7 minutes to return the result. > > >I did the same test on a Server: > >Windows Server 2012 Standard >CPU: Intel(R) Xeon(R) CPU E5-2450 @ 2.10GHz >Mem: 24GB >HD: HD 500 GB >Postgresql 9.2 > > >postgresql.conf Default settings that come with the installation > >The same SQL returned in 3 minutes. > >The test in both Servers were done bench. > >This table has 1888240 records whose size is 458 MB > >I believe that in both Servers the response time of this SQL is very >high, >but the main thing in LINUX Server has something very wrong, I think it >is >something in the settings. > >What can I be checking? The query needs a full table scan, so it mainly depends on the speed of you= r disk. Maybe you have s bloated table. Please check reltuples and relpages= from pg_class on both servers and compare. --=20 2ndQuadrant - The PostgreSQL Support Company --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance