Tom Lane wrote:
Thanks for the suggestion, Tom. Yes, I think I could do that. But I thought what I was doing now was effectively the same, because the PostgreSQL 8.0.0 Documentation says (section 27.3.1): "It is allowed to include multiple SQL commands (separated by semicolons) in the command string. Multiple queries sent in a single PQexec call are processed in a single transaction...." Our simulation application has nearly 400 event types, each of which is a C++ class for which we have a corresponding database table. So every thousand events or so I issue one PQexec() call for each event type that has unlogged instances, sending INSERT commands for all instances. For example,Steve Eckmann <[EMAIL PROTECTED]> writes: PQexec(dbConn, "INSERT INTO FlyingObjectState VALUES (...); INSERT INTO FlyingObjectState VALUES (...); ..."); My thought was that this would be a good compromise between minimizing transactions (one per event class per buffering interval instead of one per event) and minimizing disk seeking (since all queries in a single transaction insert rows into the same table). Am I overlooking something here? One thing I haven't tried is increasing the buffering interval from 1000 events to, say, 10,000. It turns out that 1000 is a good number for Versant, the object database system we're replacing, and for MySQL, so I assumed it would be a good number for PostgreSQL, too. Regards, Steve |
- Re: [PERFORM] improving write performance for logging appli... Ian Westmacott
- Re: [PERFORM] improving write performance for logging ... Steve Eckmann
- Re: [PERFORM] improving write performance for logging Ron
- Re: [PERFORM] improving write performance for logg... Ian Westmacott
- Re: [PERFORM] improving write performance for ... Jim C. Nasby
- Re: [PERFORM] improving write performance ... Ian Westmacott
- Re: [PERFORM] improving write perform... Jim C. Nasby
- Re: [PERFORM] improving write per... Ian Westmacott
- Re: [PERFORM] improving write... Tom Lane
- Re: [PERFORM] improving write perform... Michael Stone
- Re: [PERFORM] improving write performance for logging ... Steve Eckmann
- Re: [PERFORM] improving write performance for logging ... Steve Eckmann
- Re: [PERFORM] improving write performance for logg... Kelly Burkhart
- Re: [PERFORM] improving write performance for ... Steve Eckmann
- Re: [PERFORM] improving write performance for logging ... Steve Eckmann
