Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQCvB-000585-1G for pgsql-performance@arkaria.postgresql.org; Tue, 05 Jun 2018 14:26:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fQCv5-0003qJ-OA for pgsql-performance@arkaria.postgresql.org; Tue, 05 Jun 2018 14:26:43 +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.89) (envelope-from ) id 1fQCv5-0003qA-8S for pgsql-performance@lists.postgresql.org; Tue, 05 Jun 2018 14:26:43 +0000 Received: from forward2j.cmail.yandex.net ([5.255.227.20]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fQCv0-00076i-RT for pgsql-performance@lists.postgresql.org; Tue, 05 Jun 2018 14:26:41 +0000 Received: from mxback20j.mail.yandex.net (mxback20j.mail.yandex.net [IPv6:2a02:6b8:0:1619::114]) by forward2j.cmail.yandex.net (Yandex) with ESMTP id 8004A21815; Tue, 5 Jun 2018 17:26:34 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback20j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id r5nQeQTBa9-QX68i4ui; Tue, 05 Jun 2018 17:26:33 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1528208793; bh=/faNb2MbfYRZXSrPx9FVbBIMJg/qaECwdhUsWA9VNAk=; h=From:To:In-Reply-To:References:Subject:Message-Id:Date; b=M6NhaYEVB7atx50N1+uK5GI3xlsnNCFdLy2Y2yEgjXNEMAtgUzdULMfxp2VcUfv/E htrMCVjrOB864YHGB092FUtQsY78UI5D9c/RsqVE1Mj3pf42tsvrBBt06E3XHq+w6G vlO7kAPNf8IWzreMgvApRJZm+Eq5X5Chywv8czXE= Authentication-Results: mxback20j.mail.yandex.net; dkim=pass header.i=@zsrv.org Received: by web51o.yandex.ru with HTTP; Tue, 05 Jun 2018 17:26:33 +0300 From: Sergei Kornilov To: Fred Habash , "pgsql-performance@lists.postgresql.org" In-Reply-To: <560c24f9-dced-94ae-8e14-fe9451246342@gmail.com> References: <560c24f9-dced-94ae-8e14-fe9451246342@gmail.com> Subject: Re: Simple Query Elapsed Time ~ 3 hrs Using Bitmap Index/Heap Scan MIME-Version: 1.0 Message-Id: <1461841528208793@web51o.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 05 Jun 2018 17:26:33 +0300 Content-Transfer-Encoding: 7bit Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello Try using index btree(vclf_number, cl_value) instead of btree (vclf_number). regards, Sergei