ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Jenkins <krisajenk...@yahoo.co.uk>
Subject Re: Oracle + iBATIS: more details [SOLVED]
Date Thu, 17 Mar 2005 18:07:51 GMT
Brian,

On a side note, thinking about Oracle performance, you might want to 
check you're using commons DBCP & Pool v1.2.  There's an Oracle-specific 
performance bottleneck that's fixed in these releases, which I found to 
be fairly significant at high loads.  See bug #27436 
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27436> here:  
http://jakarta.apache.org/commons/dbcp/release-notes-1.2.html

I don't know if any of the committers wants to make a note about this 
on: http://wiki.apache.org/ibatis/Database_20Specific_20Information
I tried, but it's a locked page.

Cheers,
Kris

> Thanks to all who had suggestions. It turns out that it was our use of 
> the
> iBATIS caching functionality. Maybe we were using it incorrectly ?? 
> Maybe we
> should have read the docs a little better ??
>
> Anyway, it appears that the first query that took 55 seconds locked 
> the cache
> for the duration of the query. The second query was waiting to update the
> cache with its results but couldn't do so until the lock was removed 
> by the
> completion of the first query.
>
> When we removed the cacheModel attribute from the <select> element, 
> the second
> query returned immediately, even though the first was still executing.
>
> If anyone would like to enlighten me on cache usage, I'd love to hear.
>
> Thanks,
> Brian Barnett
>
> PS. It also appears that it was not specific to Oracle. We never 
> realized it
> was happening in SQL Server because we had already optimized our 
> queries for
> SQL Server, but not yet for Oracle.
>
>
> Quoting Brice Ruth <bdruth@gmail.com>:
>
>> How is your DataSource configured in JNDI?
>>
>>
>> On Wed, 16 Mar 2005 09:37:26 -0700, Brian Barnett
>> <brian.barnett@whitesandsolutions.com> wrote:
>>
>>> Below is my sql-map-config.xml file. JVM memory settings are -Xms512m
>>> -Xmx512m. Pretty sure Toad does not use JDBC to connect, since it 
>>> requires an
>>> install of the Oracle client tools.
>>>
>>> Thank you all for responding.
>>>
>>> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>>> <!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 
>>> 2.0//EN"
>>> "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
>>>
>>> <sqlMapConfig>
>>>
>>>         <settings
>>>                 cacheModelsEnabled="true"
>>>                 enhancementEnabled="true"
>>>                 lazyLoadingEnabled="true"
>>>                 useStatementNamespaces="false"
>>>                 maxSessions="128"
>>>                 maxTransactions="32"
>>>                 maxRequests="512"/>
>>>
>>>         <transactionManager type="JDBC">
>>>                 <dataSource type="JNDI">
>>>                         <property name="DataSource" 
>>> value="java:comp/env/bppool"/>
>>>                 </dataSource>
>>>         </transactionManager>
>>>
>>>         <sqlMap resource="com/scholar/model/map/PrivilegesSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/EntitySQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/GenericSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/SchoolYearsSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/DemographicSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/TeacherSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/ClassroomSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/SchoolSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/UsersSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/RolesSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/UserGroupsSQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/SchoolClassificationSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/AssessmentSQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/AssessmentGroupSQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/AssessedReportCatSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/StudentSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/TestSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/AnalysisSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/ScoreMethodSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/SubjectSQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/ReportCategorySQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/ProficiencyProfileSQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/ProficiencyRubricSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/GradeLevelSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/TestSessionSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/ConceptSQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/DefaultDailyViewSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/InterventionSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/ReportGroupSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/SavedGraphSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/MaintenanceSQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/TestScoreEntrySQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/ProficiencyProfileLevelSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/TestCourseSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/QuestionSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/CohortSQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/StudentsTestedSQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/StudentProfileSQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/ProficiencyRubricAssessmentSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/CIDTQueueSQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/DataTransferProfileSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/DataTransferSQL.xml"/>
>>>         <sqlMap resource="com/scholar/model/map/FormatSQL.xml"/>
>>>         <sqlMap 
>>> resource="com/scholar/model/map/OracleSpecificSQL.xml"/>
>>>
>>> </sqlMapConfig>
>>>
>>>
>>> Quoting Kris Jenkins <krisajenkins@yahoo.co.uk>:
>>>
>>> > Hi Brian,
>>> >
>>> > I'm using a very similar setup - tomcat 5.0.28, iBatis 2.0.9, Oracle
>>> > 8i and the ojdbc14.jar - and I don't get this problem.  Perhaps I can
>>> > help you track it down?
>>> >
>>> >> We execute a query through the web app that takes 55 seconds to 
>>> complete.
>>> >> While this query is executing, we execute another query against 
>>> the same
>>> >> table in a different browser. It normally takes a few seconds, 
>>> but it will
>>> >> not complete until the first one does.
>>> >>
>>> > First things first - one query at running at a time sounds like a
>>> > number of (sessions|transactions|requests|connections) problem.  Can
>>> > we see your sql-map-config.xml and any properties files it uses?
>>> >
>>> > Cheers,
>>> > Kris
>>> >
>>> > --
>>> > Kris Jenkins
>>> > Email:  kris@jenkster.com
>>> > Blog:   http://cafe.jenkster.com/
>>> > Wiki:   http://wiki.jenkster.com/
>>> >
>>> >
>>> >
>>> >
>>>
>>>
>>
>
>
>


-- 
Kris Jenkins
Email:  kris@jenkster.com
Blog:   http://cafe.jenkster.com/
Wiki:   http://wiki.jenkster.com/



Mime
View raw message