From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: some points for FAQ |
Date: | 2007-10-09 21:07:13 |
Message-ID: | 200710092107.l99L7Dn19785@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Pavel Stehule wrote:
> > > Better universal solution doesn't exist. Exists only unelegant
> > > solutions - but mutch faster.
> > >
> > > SELECT id, ...
> > > FROM data
> > > WHERE id = ANY(ARRAY(
> > > SELECT (random()*:max_id)::int
> > > FROM generate_series(1,20)))
> > > LIMIT 1;
> > >
> > > max_id is host variable ~ real max id + some
> > >
> > > -- fast solution if id is PK of data
> >
> > Right. We really only want general solutions in the FAQ.
> >
>
> ok. I accept it. Can be some note there? Not this strange select.
Well, with 8.3 having this be faster I am thinking we should wait to see
if the hacks are needed.
> > > Cache invalidation isn't 100% protection before this error message.
> > > With specific using of EXECUTE statement, you can get this message
> > > too. But all temp tables related problems are solved.
> >
> > OK, let's see how many bug reports we get and we can always re-add it.
> >
>
> It's true :). You have to try really wild things inside plpgsql procedures.
Good.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-10-09 21:13:29 | Re: Skytools committed without hackers discussion/review |
Previous Message | Pavel Stehule | 2007-10-09 20:58:47 | Re: some points for FAQ |