Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agBfR-0001YW-8X for pgsql-performance@arkaria.postgresql.org; Wed, 16 Mar 2016 13:39:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1agBfQ-0002mq-RP for pgsql-performance@arkaria.postgresql.org; Wed, 16 Mar 2016 13:39:16 +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 1agBdl-0000Tr-Ke for pgsql-performance@postgresql.org; Wed, 16 Mar 2016 13:37:33 +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 1agBdi-0003XW-6H for pgsql-performance@postgresql.org; Wed, 16 Mar 2016 13:37:33 +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 u2GDbRmW027202; Wed, 16 Mar 2016 09:37:27 -0400 From: Tom Lane To: Andreas Joseph Krogh cc: pgsql-performance Subject: Re: Searching GIN-index (FTS) and sort by timestamp-column In-reply-to: References: Comments: In-reply-to Andreas Joseph Krogh message dated "Wed, 16 Mar 2016 10:00:02 +0100" Date: Wed, 16 Mar 2016 09:37:27 -0400 Message-ID: <27201.1458135447@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Andreas Joseph Krogh writes: > 1. Why isnt' folder_id part of the index-cond? Because a GIN index is useless for sorting. > 2. Is there a way to make it use the (same) index to sort by > received_timestamp? No. > 3. Using a GIN-index, is there a way to use the index at all for sorting? No. > 4. It doesn't seem like ts_rank uses the index for sorting either. Same 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