You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by "Lyudmil Latinov (JIRA)" <ju...@ws.apache.org> on 2010/11/14 16:03:19 UTC

[jira] Created: (JUDDI-431) find_tModel performance - 20s for exact name + 3 KeyedReferences

find_tModel performance - 20s for exact name + 3 KeyedReferences
----------------------------------------------------------------

                 Key: JUDDI-431
                 URL: https://issues.apache.org/jira/browse/JUDDI-431
             Project: jUDDI
          Issue Type: Improvement
          Components: core
    Affects Versions: 3.0.3
            Reporter: Lyudmil Latinov
            Assignee: Kurt T Stam
            Priority: Minor


I have jUDDI with DerbyDB with 440 tModels inside.
When searching tModel for "exactMatch" name + CategoryBag with 2 KeyedReferences execution time is about 2s.
When searching tModel for "exactMatch" name + CategoryBag with 3 KeyedReferences execution time is about 20s.
With increasing number of KeyedReferences time for queue increases.
Some performance improvements will be nice enhancement.


Request for name + 2 KeyedReferences
<?xml version="1.0" encoding="UTF-8" ?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
  <Body>
    <find_tModel  xmlns="urn:uddi-org:api_v3">
            <findQualifiers>
                <findQualifier>exactMatch</findQualifier>
                <findQualifier>andAllKeys</findQualifier>
            </findQualifiers>
            <name>test classification tmodel1</name>
            <categoryBag>
                <keyedReference tModelKey = "uddi:uddi.org:categorization:types" keyName = "uddi-org:types:unchecked" keyValue = "unchecked"/>
                <keyedReference tModelKey = "uddi:uddi.org:categorization:types" keyName = "uddi-org:types:categorization" keyValue = "categorization"/>
            </categoryBag>
        </find_tModel>
    </Body>
</Envelope>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JUDDI-431) find_tModel performance - 20s for exact name + 3 KeyedReferences

Posted by "Lyudmil Latinov (JIRA)" <ju...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/JUDDI-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lyudmil Latinov resolved JUDDI-431.
-----------------------------------

    Resolution: Not A Problem

I've tried with OpenJPA2, find for 3 KeyedReferences was also so slow.
Running jUDDI with org.hibernate.ejb.HibernatePersistence 3.6 fixes this issue.
Now find takes about 0.2s.

> find_tModel performance - 20s for exact name + 3 KeyedReferences
> ----------------------------------------------------------------
>
>                 Key: JUDDI-431
>                 URL: https://issues.apache.org/jira/browse/JUDDI-431
>             Project: jUDDI
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.0.3
>            Reporter: Lyudmil Latinov
>            Assignee: Kurt T Stam
>            Priority: Minor
>
> I have jUDDI with DerbyDB with 440 tModels inside.
> When searching tModel for "exactMatch" name + CategoryBag with 2 KeyedReferences execution time is about 2s.
> When searching tModel for "exactMatch" name + CategoryBag with 3 KeyedReferences execution time is about 20s.
> With increasing number of KeyedReferences time for queue increases.
> Some performance improvements will be nice enhancement.
> Request for name + 2 KeyedReferences
> <?xml version="1.0" encoding="UTF-8" ?>
> <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
>   <Body>
>     <find_tModel  xmlns="urn:uddi-org:api_v3">
>             <findQualifiers>
>                 <findQualifier>exactMatch</findQualifier>
>                 <findQualifier>andAllKeys</findQualifier>
>             </findQualifiers>
>             <name>test classification tmodel1</name>
>             <categoryBag>
>                 <keyedReference tModelKey = "uddi:uddi.org:categorization:types" keyName = "uddi-org:types:unchecked" keyValue = "unchecked"/>
>                 <keyedReference tModelKey = "uddi:uddi.org:categorization:types" keyName = "uddi-org:types:categorization" keyValue = "categorization"/>
>             </categoryBag>
>         </find_tModel>
>     </Body>
> </Envelope>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (JUDDI-431) find_tModel performance - 20s for exact name + 3 KeyedReferences

Posted by "Lyudmil Latinov (JIRA)" <ju...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/JUDDI-431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lyudmil Latinov closed JUDDI-431.
---------------------------------


> find_tModel performance - 20s for exact name + 3 KeyedReferences
> ----------------------------------------------------------------
>
>                 Key: JUDDI-431
>                 URL: https://issues.apache.org/jira/browse/JUDDI-431
>             Project: jUDDI
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.0.3
>            Reporter: Lyudmil Latinov
>            Assignee: Kurt T Stam
>            Priority: Minor
>
> I have jUDDI with DerbyDB with 440 tModels inside.
> When searching tModel for "exactMatch" name + CategoryBag with 2 KeyedReferences execution time is about 2s.
> When searching tModel for "exactMatch" name + CategoryBag with 3 KeyedReferences execution time is about 20s.
> With increasing number of KeyedReferences time for queue increases.
> Some performance improvements will be nice enhancement.
> Request for name + 2 KeyedReferences
> <?xml version="1.0" encoding="UTF-8" ?>
> <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
>   <Body>
>     <find_tModel  xmlns="urn:uddi-org:api_v3">
>             <findQualifiers>
>                 <findQualifier>exactMatch</findQualifier>
>                 <findQualifier>andAllKeys</findQualifier>
>             </findQualifiers>
>             <name>test classification tmodel1</name>
>             <categoryBag>
>                 <keyedReference tModelKey = "uddi:uddi.org:categorization:types" keyName = "uddi-org:types:unchecked" keyValue = "unchecked"/>
>                 <keyedReference tModelKey = "uddi:uddi.org:categorization:types" keyName = "uddi-org:types:categorization" keyValue = "categorization"/>
>             </categoryBag>
>         </find_tModel>
>     </Body>
> </Envelope>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JUDDI-431) find_tModel performance - 20s for exact name + 3 KeyedReferences

Posted by "Lyudmil Latinov (JIRA)" <ju...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/JUDDI-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931990#action_12931990 ] 

Lyudmil Latinov commented on JUDDI-431:
---------------------------------------

Environment - out of the box jUDDI 3.0.3 (Derby DB, OpenJPA)
Query that is produced for 3 KeyedReference search is shown bellow.
Same SQL query run with some gui tool is executed for ~1s.

OpenJPA query
select distinct t.entityKey from Tmodel t , TmodelCategoryBag TmodelCategory_ , KeyedReference KeyedRefere_0 , KeyedReference KeyedRefere_1 , KeyedReference KeyedRefere_2 where ( t.entityKey = TmodelCategory_.tmodel.entityKey and TmodelCategory_.id = KeyedRefere_0.categoryBag.id and KeyedRefere_0.categoryBag.id = KeyedRefere_1.categoryBag.id and KeyedRefere_1.categoryBag.id = KeyedRefere_2.categoryBag.id ) and ( (KeyedRefere_0.tmodelKeyRef = ? and KeyedRefere_0.keyValue like ?) and (KeyedRefere_1.tmodelKeyRef = ? and KeyedRefere_1.keyValue like ?) and (KeyedRefere_2.tmodelKeyRef = ? and KeyedRefere_2.keyValue like ?) ) 

1	java.lang.String	uddi:uddi.org:categorization:types
2	java.lang.String	unchecked
3	java.lang.String	uddi:uddi.org:categorization:types
4	java.lang.String	categorization
5	java.lang.String	uddi:uddi.org:categorization:types
6	java.lang.String	namespace

Native SQL query:
select distinct t.entity_Key from J3_Tmodel t , J3_Tmodel_Category_Bag TmodelCategory_ , J3_Keyed_Reference KeyedRefere_0 , J3_Keyed_Reference KeyedRefere_1 , J3_Keyed_Reference KeyedRefere_2 
where ( t.entity_Key = TmodelCategory_.entity_Key and TmodelCategory_.id = KeyedRefere_0.category_bag_id and KeyedRefere_0.category_bag_id = KeyedRefere_1.category_bag_id and KeyedRefere_1.category_bag_id = KeyedRefere_2.category_bag_id ) 
and ( (KeyedRefere_0.tmodel_Key_Ref = 'uddi:uddi.org:categorization:types' and KeyedRefere_0.key_Value = 'unchecked') 
and (KeyedRefere_1.tmodel_Key_Ref = 'uddi:uddi.org:categorization:types' and KeyedRefere_1.key_Value = 'categorization') 
and (KeyedRefere_2.tmodel_Key_Ref = 'uddi:uddi.org:categorization:types' and KeyedRefere_2.key_Value = 'namespace') ) 

> find_tModel performance - 20s for exact name + 3 KeyedReferences
> ----------------------------------------------------------------
>
>                 Key: JUDDI-431
>                 URL: https://issues.apache.org/jira/browse/JUDDI-431
>             Project: jUDDI
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.0.3
>            Reporter: Lyudmil Latinov
>            Assignee: Kurt T Stam
>            Priority: Minor
>
> I have jUDDI with DerbyDB with 440 tModels inside.
> When searching tModel for "exactMatch" name + CategoryBag with 2 KeyedReferences execution time is about 2s.
> When searching tModel for "exactMatch" name + CategoryBag with 3 KeyedReferences execution time is about 20s.
> With increasing number of KeyedReferences time for queue increases.
> Some performance improvements will be nice enhancement.
> Request for name + 2 KeyedReferences
> <?xml version="1.0" encoding="UTF-8" ?>
> <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
>   <Body>
>     <find_tModel  xmlns="urn:uddi-org:api_v3">
>             <findQualifiers>
>                 <findQualifier>exactMatch</findQualifier>
>                 <findQualifier>andAllKeys</findQualifier>
>             </findQualifiers>
>             <name>test classification tmodel1</name>
>             <categoryBag>
>                 <keyedReference tModelKey = "uddi:uddi.org:categorization:types" keyName = "uddi-org:types:unchecked" keyValue = "unchecked"/>
>                 <keyedReference tModelKey = "uddi:uddi.org:categorization:types" keyName = "uddi-org:types:categorization" keyValue = "categorization"/>
>             </categoryBag>
>         </find_tModel>
>     </Body>
> </Envelope>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JUDDI-431) find_tModel performance - 20s for exact name + 3 KeyedReferences

Posted by "Lyudmil Latinov (JIRA)" <ju...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/JUDDI-431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931831#action_12931831 ] 

Lyudmil Latinov commented on JUDDI-431:
---------------------------------------

Performace quick win is in org.apache.juddi.api.impl.InquiryHelper.java - public static List<?> findTModel:
keysFound = FindTModelByNameQuery.select(em, findQualifiers, body.getName(), keysFound); to be moved on first place.
So first find based on Name criteria is performed and on those results find on CategoryBag criteria is performed.
For my usecase execution time was significantly reduced.

> find_tModel performance - 20s for exact name + 3 KeyedReferences
> ----------------------------------------------------------------
>
>                 Key: JUDDI-431
>                 URL: https://issues.apache.org/jira/browse/JUDDI-431
>             Project: jUDDI
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.0.3
>            Reporter: Lyudmil Latinov
>            Assignee: Kurt T Stam
>            Priority: Minor
>
> I have jUDDI with DerbyDB with 440 tModels inside.
> When searching tModel for "exactMatch" name + CategoryBag with 2 KeyedReferences execution time is about 2s.
> When searching tModel for "exactMatch" name + CategoryBag with 3 KeyedReferences execution time is about 20s.
> With increasing number of KeyedReferences time for queue increases.
> Some performance improvements will be nice enhancement.
> Request for name + 2 KeyedReferences
> <?xml version="1.0" encoding="UTF-8" ?>
> <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
>   <Body>
>     <find_tModel  xmlns="urn:uddi-org:api_v3">
>             <findQualifiers>
>                 <findQualifier>exactMatch</findQualifier>
>                 <findQualifier>andAllKeys</findQualifier>
>             </findQualifiers>
>             <name>test classification tmodel1</name>
>             <categoryBag>
>                 <keyedReference tModelKey = "uddi:uddi.org:categorization:types" keyName = "uddi-org:types:unchecked" keyValue = "unchecked"/>
>                 <keyedReference tModelKey = "uddi:uddi.org:categorization:types" keyName = "uddi-org:types:categorization" keyValue = "categorization"/>
>             </categoryBag>
>         </find_tModel>
>     </Body>
> </Envelope>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.