On Aug 22, 2013, at 8:28 AM, Vincent Veyron <vv.li...@wanadoo.fr> wrote:

>> Try the connected callback, instead:
>> 
>>  http://justatheory.com/computers/databases/postgresql/execute-on-select.html
>> 
> 
> 
> Hi David,
> 
> I did study your fine article for my research, thank you for that :-)
> 
> But you must have overlooked the part of my post where I write that the
> connected callback creates a new handle for each query in the database;
> no caching happens as one can see with CackedKids after a few queries

Oy, yes, sorry, I did miss that.

> Apache is configured with MaxClients=1, so that only one process is
> active.

Stranger and stranger.

> There should be only two cached handles (one with
> private_preferred_datestyle ='iso', one 'SQL, dmy') :

So, do you get a new handle for every query *without* the callback?

Note that DBI will reset all the attributes every time connect_cached is 
called. Maybe you need to delete one or more of the attributes in a 
connect_cached.reused callback?

  
http://www.justatheory.com/computers/programming/perl/dbi-connect-cached-hack.html

HTH,

David

Reply via email to