On Wednesday, January 9, 2013 at 1:19:26 PM UTC-3 Jeremy Evans wrote:

> On Wednesday, January 9, 2013 6:56:06 AM UTC-8, Rodrigo Rosenfeld Rosas 
> wrote:
>>
>> Yes, I understand, but maybe the performance hit would be smaller than 
>> the other simple alternative (limiting concurrent requests to available db 
>> connections through Database.synchronize Rack middleware).
>>
>> But I guess there isn't any after_checkout hook, right?
>>
>
> There isn't, but that's basically what the connection_validator extension 
> does.  So take a look at that plugin's implementation if you want to figure 
> out how to run code on each checkout.
>

Hi Rodrigo, I know this is an old thread, but I wonder if you ever tried 
the approach of setting the schema on every connection checkout and 
measured the performance hit. 

I'm looking at different approaches about ensuring the same schema is used 
for a single request. Although I agree that qualifying the statements is 
the best solution (and I would love to take that path) putting the 
qualifier in the models seems a little risky to me, as access to the 
database could also happen without using the models.
 

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/ff0d89ba-8ed1-42ed-804c-e812a0242e56n%40googlegroups.com.

Reply via email to