On Nov 12, 12:28 pm, Hongli Lai <[EMAIL PROTECTED]> wrote: > russm wrote: > > speed advantage to prepared statements is that they only get planned > > once. an insert requires essentially no planning, so there's no > > benefit. try running your test again with a complex select that join > > 10 tables but returns only a couple of rows and see the advantage. > > So are there any good benchmark suites out there? I can come up with an > insanely complex SQL query if I take the time, but it'll be totally > disconnected with real-world SQL usage.
there's no One True Benchmark, and prepared queries aren't a silver bullet for poor DB performance... use a tool like PQA (http:// pqa.projects.postgresql.org/) to find queries in your app that are complex and executed often, use whatever tools your DB provides to see how the planner is dealing with them, and then check if you get an overall performance benefit from preparing those statements... this is the only way to determine if any particular query will benefit from being pre-prepared... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
