Forum OpenACS Development: Tuning new portal datasource

Collapse
Posted by Malte Sussdorff on
I stumbled upon this query which takes quite some time:

284 ms 0or1row dbqd.new-portal.tcl.portal-procs.portal::get_datasource_name.select: 0or1row nsdb0

select name
from portal_datasources
where datasource_id = :ds_id

I was wondering how long I could util_memoize this? My assumption would be forever if you cannot change the data source name without a restart :)

Collapse
Posted by Jeff Davis on
If that query takes 284ms there is something seriously wrong with your db. Its a query on the primary key of a table with not all that many rows. It should be 3-4ms at most.
Collapse
Posted by Malte Sussdorff on
Now the query is down to 3ms. The wonders of Oracle...