Received: from secure.arcamax.com (secure.arcamax.com [209.96.210.67]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAFGbvm20764 for ; Thu, 15 Nov 2001 11:37:58 -0500 (EST) (envelope-from bryan@arcamax.com) Received: from bryan (dhcp46 [209.96.210.46]) by secure.arcamax.com (8.11.6/8.11.6) with SMTP id fAFGc3602058 for ; Thu, 15 Nov 2001 11:38:03 -0500 Message-ID: <00a801c16df3$e06d6230$2ed260d1@bryan> From: "Bryan White" To: "pgsql-sql" Subject: How to best grab a chunk of Ids from a sequence Date: Thu, 15 Nov 2001 11:37:55 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200111/219 X-Sequence-Number: 5602 I have a process that will be creating a large number of records (about 4Million). I am thinking of making this process run quicker by writing the records to a file in 'dump' format and then running that file through psql. The problem is each record has a sequence number and I need to know the sequence ids for other purposes in this process. My question is is there a way to grab 4 million IDs from a sequence without calling nextval once for each ID. Note, this sequence is being actively drawn on by other processes. --------- Bryan White