From: | hubert depesz lubaczewski <depesz(at)depesz(dot)com> |
---|---|
To: | Harald Fuchs <hari(dot)fuchs(at)googlemail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: generate_series woes |
Date: | 2008-04-16 12:20:16 |
Message-ID: | 20080416122016.GA28221@depesz.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Apr 14, 2008 at 11:21:58AM +0200, Harald Fuchs wrote:
> I think there's something sub-optimal with generate_series.
> In the following, "documents" is a table with more than 120000 rows,
> vacuumed and analyzed before the queries.
> Since generate_series is a builtin function, can't it tell how many
> rows it will return?
i think it would be better off not to limit some functionality for
builtin functions. it would be much nicer to have the ability to hint
planer about rowcount from function *in* the sql.
something like:
select i from generate_series(1,10) {hint:10} as i;
i'm not proposiung syntax. i'm suggesting the functionality.
depesz
--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA. here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2008-04-16 12:35:15 | Re: generate_series woes |
Previous Message | Harald Fuchs | 2008-04-16 11:55:10 | Re: generate_series woes |