Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZWiG0-0001AM-Ho for pgsql-performance@arkaria.postgresql.org; Tue, 01 Sep 2015 09:53:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZWiFz-0001SS-Fn for pgsql-performance@arkaria.postgresql.org; Tue, 01 Sep 2015 09:53:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZWiEN-00080t-Cp for pgsql-performance@postgresql.org; Tue, 01 Sep 2015 09:51:55 +0000 Received: from mbob.nabble.com ([162.253.133.15]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZWiEK-0007mp-4T for pgsql-performance@postgresql.org; Tue, 01 Sep 2015 09:51:53 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mbob.nabble.com (Postfix) with ESMTP id 8E259147789C for ; Tue, 1 Sep 2015 02:48:49 -0700 (PDT) Date: Tue, 1 Sep 2015 02:51:50 -0700 (MST) From: twoflower To: pgsql-performance@postgresql.org Message-ID: <1441101110741-5864173.post@n5.nabble.com> In-Reply-To: References: <55E47E97.1090202@2ndquadrant.com> <1441047830983-5864075.post@n5.nabble.com> <1441048763332-5864080.post@n5.nabble.com> <1441050416677-5864088.post@n5.nabble.com> <1441053041230-5864101.post@n5.nabble.com> <1441094025534-5864164.post@n5.nabble.com> Subject: =?UTF-8?Q?Re:__Re:_Query_>_1000=C3=97_slow?= =?UTF-8?Q?down_after_adding_datetime_comparison?= 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-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org =E6=9E=97=E5=A3=AB=E5=8D=9A wrote > I think you should try putting the precomputed boolean temp_eval column > to "EXTERNAL_TRANSLATION" r table. >=20 > And if possible, try creating a conditional index on id where temp_eval is > true, > on "EXTERNAL_TRANSLATION" r table. >=20 > So that, only check this index can get the top 1000 records. I agree that might help. But I would still like to understand what's the reason for difference between the second and the third query. Both contain a simple =3D expression, yet one finishes immediately and one runs for 41 minutes. -- View this message in context: http://postgresql.nabble.com/Query-1-000-000-= slowdown-after-adding-datetime-comparison-tp5864045p5864173.html Sent from the PostgreSQL - performance mailing list archive at Nabble.com. --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance