On Nov 12, 10:25 am, Drunkguy <[EMAIL PROTECTED]> wrote:
> I am using Sequel ORM with Merb.  Is there an easy way to dump the
> options that are being passed to ConnectionPool.new?

You could use DB.pool.inspect to get the current parameters (most of
which don't change after the connection pool is created).

> When I start merb I see the following:
>
>  ~ SELECT * FROM (SELECT * FROM "SM_WORKLOG") WHERE ROWNUM <= 1
>  ~ SELECT * FROM (SELECT * FROM "SM_WORKLOG") WHERE ROWNUM <= 1
>  ~ SELECT * FROM (SELECT * FROM "ND_WORKLOG") WHERE ROWNUM <= 1
>  ~ SELECT * FROM (SELECT * FROM "ND_WORKLOG") WHERE ROWNUM <= 1
>  ~ SELECT * FROM (SELECT * FROM "SM_SCHEDULED_MAINTENANCE") WHERE
> ROWNUM <= 1
>  ~ SELECT * FROM (SELECT * FROM "SM_SCHEDULED_MAINTENANCE") WHERE
> ROWNUM <= 1
>  ~ SELECT * FROM (SELECT * FROM "ND_TICKET") WHERE ROWNUM <= 1
>  ~ SELECT * FROM (SELECT * FROM "ND_TICKET") WHERE ROWNUM <= 1
>
> Would the size of those tables have anything to do with the
> Sequel::Error::PoolTimeoutError  error?

If you have huge tables, such that those queries are taking long
enough that when a new query comes in no connection is available in 5
seconds (the default timeout), then yes, I suppose they could be
related.  I'm not sure how well Oracle optimizes the above query.  If
it is really selecting all rows of the table in the subselect and then
just picking one, that would definitely have a dramatic negative
effect on performance.  It seems unlikely that Oracle wouldn't
optimize the query to return as soon as 1 record is available from the
subselect, but I'm not an Oracle user and know very little about the
inner workings of Oracle.

Jeremy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to