pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Benjamin Arai <me@benjaminarai.com>
Cc: Benjamin Arai <benjamin@araisoft.com>
Cc: Oleg Bartunov <oleg@sai.msu.su>
Cc: PostgreSQL <pgsql-general@postgresql.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Slow TSearch2 performance for table with 1 million documents.
Date: Thu, 11 Oct 2007 11:53:05 -0400
Message-ID: <21653.1192117985@sss.pgh.pa.us> (raw)
In-Reply-To: <3E8290A0-05DA-4F0F-A783-859124278D27@benjaminarai.com>
References: <D582BC3F-9F49-40C9-A959-1F9C8D3AA60B@araisoft.com>
	<16663.1191597165@sss.pgh.pa.us>
	<Pine.LNX.4.64.0710051932030.3304@sn.sai.msu.ru>
	<6936504E-3560-4BE9-86BE-BEDAB3CD355A@araisoft.com>
	<3E8290A0-05DA-4F0F-A783-859124278D27@benjaminarai.com>

Benjamin Arai <me@benjaminarai.com> writes:
> It appears that the ORDER BY rank operation is the slowing factor.   
> If I remove it then the query is pretty fast.  Is there another way  
> to perform ORDER BY such that it does not do a sort?

I think you misunderstood: it's not the sort that's slow, it's the
computation of the rank() values that are inputs to the sort.

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <21653.1192117985@sss.pgh.pa.us>
Permalink:  ../21653.1192117985@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21653.1192117985@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, me@benjaminarai.com, benjamin@araisoft.com, oleg@sai.msu.su, pgsql-general@postgresql.org
  Subject: Re: [PERFORM] Slow TSearch2 performance for table with 1 million documents.
  In-Reply-To: <21653.1192117985@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox