in reply to Re^7: Best practices for closing database connections?
in thread Best practices for closing database connections?
For placeholders, here's my take.
1. Efficiency? I doubt that you'd ever spot a difference
You may not spot a difference with a single query if processing time is less than a millisecond but when repeated, you do notice.
On one local postgres server (version 15 beta 1), when I compare queries with placeholder versus hard-coded, the placeholder variant is consistently 2 to 3 times faster. (I think the main reason must be that the PREPARE needs only to run once.)
|
---|
In Section
Seekers of Perl Wisdom