Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [propel-dev] Query counting

propel
Discussion topic

Back to topic list

Re: [propel-dev] Query counting

Reply

Author Oliver Schonrock <oliver at realtsp dot com>
Full name Oliver Schonrock <oliver at realtsp dot com>
Date 2007-07-12 06:40:03 PDT
Message Hans Lellelid wrote:
> This looks interesting, Oliver. Other than not being able to use
> user-defined class with persistent connection (am I understanding that
> correctly? seems odd),

I agree it is odd. but that's what the docs say...

We do not use persistent connections because:
a) it creates a huge number of sleeping connections when you have 100+
http processes and multiple databases.

b) the time saving is not significant for us given the time taken to run
the queries and rest of app (connect time ~ 1ms, query time is often >
30ms and total parse time 50-200ms). These things obviously vary with
applications, but i guess most propel applications are less than trivial
and therefore may not benefit from the small saving of a persistent
connection?

> were there any other limitations?

Not that I am aware of. The overiding of PDO::query() was slightly
tricky because of that slightly mad syntax required to call "parent"
conveniently with variable number and type of params:

http://uk.php.net/ma​nual/en/function.PDO​-query.php

$args = func_get_args();
call_user_func_array​(array($this, 'parent::query'), $args)

but it works well. So well that I decided to use it for the constructor
too with its 4 params that could change in the future.


--

Oliver Schonrock
Attachments

« Previous message in topic | 5 of 36 | Next message in topic »

Messages

Show all messages in topic

                                                             Re: [propel-dev] Query counting Christian Kassab <chris dot kassab at gmail dot com> Christian Kassab <chris dot kassab at gmail dot com> 2007-07-19 07:25:22 PDT
                                                                 Re: [propel-dev] Query counting hlellelid Hans Lellelid 2007-07-19 08:56:10 PDT
                                                                 Re: [propel-dev] Query counting Pedram Nimreezi <zenstyle at gmail dot com> Pedram Nimreezi <zenstyle at gmail dot com> 2007-07-19 11:22:04 PDT
                                                                     Re: [propel-dev] Query counting Christian Kassab <chris dot kassab at gmail dot com> Christian Kassab <chris dot kassab at gmail dot com> 2007-07-19 13:41:31 PDT
                                                                         Re: [propel-dev] Query counting Pedram Nimreezi <zenstyle at gmail dot com> Pedram Nimreezi <zenstyle at gmail dot com> 2007-07-19 18:21:13 PDT
                                                                 Re: [propel-dev] Query counting Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-07-19 13:36:08 PDT
                                                             Re: [propel-dev] Query counting Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-07-19 13:32:38 PDT
                                                         Re: [propel-dev] Query counting Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2007-07-19 13:30:30 PDT
         Re: [propel-dev] translation cysio Krzysio 2007-12-27 02:11:27 PST
             Re: [propel-dev] translation hlellelid Hans Lellelid 2007-12-27 04:07:50 PST
                 Re: [propel-dev] translation cysio Krzysio 2007-12-27 04:27:41 PST
Page: of 2 « Previous | Next »
Messages per page: