Re: Statistical Analysis
| От | Timothy H. Keitt |
|---|---|
| Тема | Re: Statistical Analysis |
| Дата | |
| Msg-id | 397CF164.7034DBEF@nceas.ucsb.edu обсуждение исходный текст |
| Ответ на | RE: Statistical Analysis ("Nathan Barnett" <nbarnett@cellularphones.com>) |
| Список | 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/
В списке pgsql-general по дате отправления: