Re: psql is slow and it does not take much resources
От | Jim C. Nasby |
---|---|
Тема | Re: psql is slow and it does not take much resources |
Дата | |
Msg-id | 20060504210650.GL97354@pervasive.com обсуждение исходный текст |
Ответ на | Re: psql is slow and it does not take much resources ("Leif B. Kristensen" <leif@solumslekt.org>) |
Ответы |
Re: psql is slow and it does not take much resources
Re: psql is slow and it does not take much resources |
Список | pgsql-general |
On Thu, May 04, 2006 at 10:58:24PM +0200, Leif B. Kristensen wrote: > On Thursday 04 May 2006 22:30, Jim C. Nasby wrote: > >On Wed, May 03, 2006 at 04:28:10PM +0200, Leif B. Kristensen wrote: > >> However, I'm wondering if there's a practical limit to how many rows > >> you can insert within one transaction? > > > >I believe transactions are limited to 4B commands, so the answer would > >be 4B rows. > > That is definitely not the case. I routinely do around 36000 inserts > wrapped up in one transaction. Check your eyes or cleen your monitor. ;) I said 4B as in 4 *billion*. And as Tom mentioned, if you have foreign keys or triggers each insert will burn through multiple CIDs. > I know that there is one hard-wired limit due to the OID wrap-around > problem, at 2^31 commands in one transaction. But the practical limit > due to hardware resources is probably much lower. This has nothing to do with OIDs, and in fact I don't believe there's any intrinsic reason why you couldn't insert more than 2B records in a table with OIDs so long as you don't have a unique index defined on it. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
В списке pgsql-general по дате отправления: