Re: performance for high-volume log insertion
От | Joshua D. Drake |
---|---|
Тема | Re: performance for high-volume log insertion |
Дата | |
Msg-id | 1240435063.2119.119.camel@jd-laptop.pragmaticzealot.org обсуждение исходный текст |
Ответ на | Re: performance for high-volume log insertion (James Mansion <james@mansionfamily.plus.com>) |
Список | pgsql-performance |
On Wed, 2009-04-22 at 21:53 +0100, James Mansion wrote: > Stephen Frost wrote: > > You're re-hashing things I've already said. The big win is batching the > > inserts, however that's done, into fewer transactions. Sure, multi-row > > inserts could be used to do that, but so could dropping begin/commits in > > right now which probably takes even less effort. > > > Well, I think you are seriously underestimating the cost of the > round-trip compared The breakdown is this: 1. Eliminate single inserts 2. Eliminate round trips Yes round trips are hugely expensive. > > > No, as was pointed out previously already, you really just need 2. A > > > And I'm disagreeing with that. Single row is a given, but I think > you'll find it pays to have one My experience shows that you are correct. Even if you do a single BEGIN; with 1000 inserts you are still getting a round trip for every insert until you commit. Based on 20ms round trip time, you are talking 20seconds additional overhead. Joshua D. Drake -- PostgreSQL - XMPP: jdrake@jabber.postgresql.org Consulting, Development, Support, Training 503-667-4564 - http://www.commandprompt.com/ The PostgreSQL Company, serving since 1997
В списке pgsql-performance по дате отправления: