Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zc4bV-0001QY-JT for pgsql-sql@arkaria.postgresql.org; Wed, 16 Sep 2015 04:45:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zc4bV-0002Ol-2C for pgsql-sql@arkaria.postgresql.org; Wed, 16 Sep 2015 04:45:57 +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 1Zc4bT-0002OX-Hc for pgsql-sql@postgresql.org; Wed, 16 Sep 2015 04:45:55 +0000 Received: from mbob.nabble.com ([162.253.133.15]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Zc4bL-0003Kk-Qj for pgsql-sql@postgresql.org; Wed, 16 Sep 2015 04:45:54 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mbob.nabble.com (Postfix) with ESMTP id A31391599B35 for ; Tue, 15 Sep 2015 21:40:58 -0700 (PDT) Date: Tue, 15 Sep 2015 21:45:44 -0700 (MST) From: gmb To: pgsql-sql@postgresql.org Message-ID: <1442378744681-5866097.post@n5.nabble.com> In-Reply-To: References: <1442318204445-5865953.post@n5.nabble.com> Subject: Re: View not using index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org Thanks for the reply, Brice. Brice Andr=C3=A9 wrote > - If your test DB has so few data that it is not efficient to use the > index, this last will not be used. You should probably try to insert > more > data before performing the test > - the query planner uses table statistics to decide if it uses an > index. > But, if those statistics are not up-to-date, the choice can be not > optimal. > You should maybe try to look at 'Analyse' command to get more info : As I said, the data in my production env is populated but I'm getting the same results, even after running ANALYZE on the tables. -- View this message in context: http://postgresql.nabble.com/View-not-using-i= ndex-tp5865953p5866097.html Sent from the PostgreSQL - sql mailing list archive at Nabble.com. --=20 Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql