Re: Massive slowdown when LIMIT applied - Mailing list pgsql-general

From macgillivary
Subject Re: Massive slowdown when LIMIT applied
Date
Msg-id 1155952050.386252.318770@74g2000cwt.googlegroups.com
Whole thread Raw
In response to Massive slowdown when LIMIT applied  (Graeme Hinchliffe <graeme.hinchliffe@zeninternet.co.uk>)
List pgsql-general
Purely out of curiosity, what sort of execution time do you get if you
use:

SELECT *
FROM (SELECT username,acctstarttime FROM radacct WHERE username='user'

ORDER BY acctstarttime ) allstarttimes
LIMIT 50;


Graeme Hinchliffe wrote:
>
> Now, if I do the following:
>
> SELECT username,acctstarttime FROM radacct WHERE username='user'
> ORDER BY acctstarttime LIMIT 50;
>
> I have to wait a very long time, IE instead of 2-3 seconds.. can be
> as slow as 10+ minutes.


pgsql-general by date:

Previous
From: "gao iqiang"
Date:
Subject: unique constraint when updating tables
Next
From: "macieh"
Date:
Subject: External variable