Re: Select-Insert-Query

Поиск
Список
Период
Сортировка
От postgres@countup.de
Тема Re: Select-Insert-Query
Дата
Msg-id 20040302004903.DA8D55A816E@kserver17.erfurt12.de
обсуждение исходный текст
Ответ на Select-Insert-Query  (postgres@countup.de)
Ответы Re: Select-Insert-Query
Список pgsql-performance
Hi, <br /><br />nobody has an idea? :-( <br /><br />-----Ursprüngliche Nachricht----- <br />Von:
pgsql-performance-owner@postgresql.org[mailto:pgsql-performance-owner@postgresql.org] Im Auftrag von
postgres@countup.de<br />Gesendet: Freitag, 27. Februar 2004 17:53 <br />An: pgsql-performance@postgresql.org <br
/>Betreff:[PERFORM] Select-Insert-Query <br /><br />Hi, <br /><br />what is the most performant way to select for
examplethe first 99 rows of a table and insert them into another table... <br /><br />at the moment i do this: <br
/><br/>for userrecord in select * from table where account_id = a_account_id and counter_id = userrecord.counter_id and
visitortable_idbetween a_minid and a_maxid limit 99 loop <br />insert into lastusers (account_id, counter_id, date, ip,
hostname)values(a_account_id,userrecord.counter_id,userrecord.date ,userrecord.ip,userrecord.hostname); <br />end loop;
<br/><br />i think "limit" is a performance killer, is that right? but what to do instead <br /><br />thanks <br />bye
<br/> 

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: WAL Optimisation - configuration and usage
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: WAL Optimisation - configuration and usage