Select-Insert-Query - Mailing list pgsql-performance

From postgres@countup.de
Subject Select-Insert-Query
Date
Msg-id 20040227165239.7A6495A8173@kserver17.erfurt12.de
Whole thread Raw
Responses Re: Select-Insert-Query
List pgsql-performance
Hi, <br /><br />what is the most performant way to select for example the first 99 rows of a table and insert them into
anothertable... <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_id between 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
/>ithink "limit" is a performance killer, is that right? but what to do instead <br /><br />thanks <br />bye 

pgsql-performance by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: FreeBSD config
Next
From: Dror Matalon
Date:
Subject: Re: FreeBSD config