Re: [phpOpenTracker-User] Duplicate key insertion (bug?) with postgreSQL
Jean-Christian Imbeault <[email protected]>
| Newsgroups | gmane.comp.web.phpopentracker.general |
|---|---|
| Message-ID | <[email protected]> |
Sebastian Bergmann wrote: > > Well, it doesn't. It adds several SELECT queries for the first request > of a session and one additional SELECT query for every request > thereafter. You're right that it adds an extra select. But it also prevents in most cases (99%?) the logging of an error message. I think the disk overhead of writing the error is *much* higher than the overhead of an extra SELECT don't you think? ;) So even with the extra SELECT you still gain in performance ^_^ But I think I see your point. Postgres users would see a gain in performance but MySQL users would see a possible drop. But I am not sure how much of a performance penalty, if any, MySQL would suffer. Even with the original INSERT as you had it the DB still needs to check that there is no record using the primary key you want to insert. So it is still doing the SELECT ... > Is there no way to prevent that error logging? There is no way to prevent error logging for this *specific* error but error logging in general can be turned off I think. But turning off all error logging doesn't sound like a good thing though ... Jean-Christian Imbeault ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01