From: | "Timothy H(dot) Keitt" <keitt(at)nceas(dot)ucsb(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew McMillan <Andrew(at)catalyst(dot)net(dot)nz>, Nathan Barnett <nbarnett(at)cellularphones(dot)com>, "'Stephan Szabo'" <sszabo(at)kick(dot)com>, pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: Statistical Analysis |
Date: | 2000-07-25 01:46:12 |
Message-ID: | 397CF164.7034DBEF@nceas.ucsb.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane wrote:
>
> Note that this isn't necessarily going to fix your performance problem,
> since a scan of the whole input table is still going to be required.
> But if the expensive processing was somewhere downstream of that basic
> scan, it should help.
>
The only way that I know of to do this fast is to insert the items in
random order. I've done this (in C++, not postgres) using a map
(b-tree) data structure: insert key-value pairs with the key being a
random number; then pop entries off the tail of the map as needed.
Tim
--
Timothy H. Keitt
National Center for Ecological Analysis and Synthesis
735 State Street, Suite 300, Santa Barbara, CA 93101
Phone: 805-892-2519, FAX: 805-892-2510
http://www.nceas.ucsb.edu/~keitt/
From | Date | Subject | |
---|---|---|---|
Next Message | anuj | 2000-07-25 04:00:54 | RE: how connect visual basic to pgsql? |
Previous Message | Dave Burbidge | 2000-07-25 01:24:59 | RE: PostgreSQL, ODBC, Access |