Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQbSM-0002bg-NG for pgsql-performance@arkaria.postgresql.org; Fri, 22 Jul 2016 14:29:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bQbSM-0000fB-7N for pgsql-performance@arkaria.postgresql.org; Fri, 22 Jul 2016 14:29:38 +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 1bQbSL-0000f4-NU for pgsql-performance@postgresql.org; Fri, 22 Jul 2016 14:29:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bQbSI-0004U4-Pa for pgsql-performance@postgresql.org; Fri, 22 Jul 2016 14:29:37 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u6METUbi021334; Fri, 22 Jul 2016 10:29:30 -0400 From: Tom Lane To: Oscar Camuendo cc: "pgsql-performance@postgresql.org" Subject: Re: [PERFORMANCE] Performance index and table In-reply-to: References: Comments: In-reply-to Oscar Camuendo message dated "Fri, 22 Jul 2016 13:34:55 -0000" Date: Fri, 22 Jul 2016 10:29:30 -0400 Message-ID: <21333.1469197770@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) 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 Oscar Camuendo writes: > I'm working on Postgresql 9.5.3 and executed a query which takes 5 or 7 seconds and it should not take more than 0.30 milliseconds, the query is: Have you ANALYZEd your tables lately? Some of these estimated row counts seem awfully far off for no very good reason. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance