Eli Mesika has posted comments on this change.

Change subject: engine: SearchQuery generates slow query on vds_with_tags and 
storage_domains
......................................................................


Patch Set 17:

(4 comments)

http://gerrit.ovirt.org/#/c/20914/17/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SyntaxChecker.java
File 
backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/SyntaxChecker.java:

Line 899:                                 generateFromStatement(syntax, false),
Line 900:                         wherePhrase);
Line 901:                 generalQuery = true;
Line 902:             } else {
Line 903:                 innerQuery = StringFormat.format("SELECT %1$s.%2$s 
FROM %3$s %4$s", tableName, primeryKey, fromStatement,
IMHO worth adding a method here 

private String getXXX(ableName, primeryKey, fromStatement,wherePhrase);
Line 904:                             wherePhrase);
Line 905:             }
Line 906:             // adding a secondary default sort by entity name
Line 907:             StringBuilder sortExpr = new StringBuilder();


http://gerrit.ovirt.org/#/c/20914/17/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/VdcUserConditionFieldAutoCompleter.java
File 
backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/VdcUserConditionFieldAutoCompleter.java:

Line 44:         columnNameDict.put("TITLE", "role");
Line 45:         columnNameDict.put("GROUP", "groups");
Line 46:         columnNameDict.put("ACTIVE", "active");
Line 47:         columnNameDict.put("ROLE", "mla_role");
Line 48:         columnNameDict.put("TAG", 
SyntaxChecker.TAG_COLUMN_NAME_IN_CRITERIA);
I think that you should leave "tag_name" here and if we want in future we will 
put constants on all , putting it only on one is not clear...
Line 49:         columnNameDict.put("POOL", "vm_pool_name");
Line 50:         columnNameDict.put("TYPE", "user_group");
Line 51:         // Building the validation dict
Line 52:         buildBasicValidationTable();


http://gerrit.ovirt.org/#/c/20914/17/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/VdsConditionFieldAutoCompleter.java
File 
backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/VdsConditionFieldAutoCompleter.java:

Line 74:         columnNameDict.put("CPU_MODEL", "cpu_model");
Line 75:         columnNameDict.put("ACTIVE_VMS", "vm_active");
Line 76:         columnNameDict.put("MIGRATING_VMS", "vm_migrating");
Line 77:         columnNameDict.put("COMMITTED_MEM", "mem_commited");
Line 78:         columnNameDict.put("TAG", 
SyntaxChecker.TAG_COLUMN_NAME_IN_CRITERIA);
same
Line 79:         columnNameDict.put("TYPE", "vds_type");
Line 80:         columnNameDict.put("DATACENTER", "storage_pool_name");
Line 81:         columnNameDict.put("ID", "vds_id");
Line 82:         columnNameDict.put("ARCHITECTURE", "architecture");


http://gerrit.ovirt.org/#/c/20914/17/backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/VmConditionFieldAutoCompleter.java
File 
backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/VmConditionFieldAutoCompleter.java:

Line 87:         columnNameDict.put("CLUSTER", "vds_group_name");
Line 88:         columnNameDict.put("POOL", "vm_pool_name");
Line 89:         // mColumnNameDict.Add("NOTE", "note");
Line 90:         columnNameDict.put("LOGGEDINUSER", "guest_cur_user_name");
Line 91:         columnNameDict.put("TAG", 
SyntaxChecker.TAG_COLUMN_NAME_IN_CRITERIA);
same
Line 92:         columnNameDict.put("DATACENTER", "storage_pool_name");
Line 93:         columnNameDict.put("TYPE", "vm_type");
Line 94:         columnNameDict.put("QUOTA", "quota_name");
Line 95:         columnNameDict.put("HOST", "run_on_vds_name");


-- 
To view, visit http://gerrit.ovirt.org/20914
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia0b7a4912d031c4cdafd636126730ea81d8d2bdd
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to