Re: [HACKERS] Solution for LIMIT cost estimation - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: [HACKERS] Solution for LIMIT cost estimation
Date
Msg-id 38A8A141.DDDE8548@tm.ee
Whole thread Raw
In response to Solution for LIMIT cost estimation  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Solution for LIMIT cost estimation
List pgsql-hackers
Don Baccus wrote:
> 
> At 11:41 AM 2/14/00 +0200, Hannu Krosing wrote:>Maybe we should still discourage the use of LIMIT, and rather
introduce
> >another "mode" for optimiser, activated by SET FastStart TO 'ON'.
> >Then queries with limit could be rewritten into
> >SET FastStart to 'ON';
> >DECLARE
> >MOVE
> >FETCH
> >CLOSE
> >SET FastStart to PREVIOUS_VALUE;
> >
> >also maybe we will need PUSH/POP for set commands ?
> 
> Well...personally I don't see LIMIT as being particularly harmful,
> and it is a convenience.  Remember, for the web space you're speaking
> of keeping overhead low is a real concern, and requiring a series
> of queries where currently only one needed will probably go over like
> a lead ballon.

I meant that the _backend_ could (in some distant future, when the 
optimiser is perfect :) implement LIMIT as above sequence.

---------------
Hannu


pgsql-hackers by date:

Previous
From: Chris Bitmead
Date:
Subject: Re: [HACKERS] Solution for LIMIT cost estimation
Next
From: Hannu Krosing
Date:
Subject: Re: [HACKERS] Solution for LIMIT cost estimation