How to speed up commits?
От | Lincoln Yeoh |
---|---|
Тема | How to speed up commits? |
Дата | |
Msg-id | 3.0.5.32.20000403145139.007adce0@pop.mecomb.po.my обсуждение исходный текст |
Ответ на | RE: RES: [GENERAL] Stored procedures returning multiple values... ? ("Henrique Pantarotto" <pantarotto@terra.com.br>) |
Ответы |
Re: How to speed up commits?
|
Список | pgsql-general |
Hi, I was doing a few tests to optimize my perl web app, and this is what I got. without database: 140 hits/sec with a rollback/begin and a select: 90 hits/sec with a rollback/begin, select and an update (but no commit): 70 hits/sec with a rollback/begin, select + update + commit: 13 hits/sec Any idea how to speed things up? Turning off sync would be dangerous right? The minimum my web app does is: 1) rollback/begin 2) select session information 3) update session information (new session time out) 4) commit update I written a simple script which does the same thing and the figures are the same. Any idea how to speed things up without switching to another database engine or session control method? Or do I have to live with 13 hits/sec max? )-; Does MySQL turn off sync? I don't think it does, but it seems to be able to do updates (and thus syncs) a lot faster. I know postgresql has got transactions and all that, but from the "time" statistics, the CPU isn't really being pushed, so if it's not sync what's it waiting for? (benchmark does 100 sets of the four steps). time ./benchmark 0.26user 0.02system 0:07.65elapsed 3%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (295major+221minor)pagefaults 0swaps Whereas if I remove the commit: time ./benchmark 0.21user 0.02system 0:01.57elapsed 14%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (294major+223minor)pagefaults 0swaps Any suggestions welcome! Cheerio, Link.
В списке pgsql-general по дате отправления: