Better indexing for string properties to support path-based lookups

- Normal prefix-index has been shortened to 32 chars (from 64)
 - Added a fully indexed 'string_end' column of 16 characters
 - iBatis queries are optimized to pull short strings from the index
 - Long paths and NodeRefs are well-indexed using this approach


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15833 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-08-20 13:03:29 +00:00
parent f1e5670836
commit 33cb2a4d75
5 changed files with 91 additions and 41 deletions

View File

@@ -37,6 +37,7 @@ public class PropertyStringValueEntity
{
private Long id;
private String stringValue;
private String stringEnd;
public PropertyStringValueEntity()
{
@@ -81,6 +82,23 @@ public class PropertyStringValueEntity
{
return new Pair<Long, String>(id, stringValue);
}
/**
* Set the string and string-end values
*/
public void setValue(String value)
{
this.stringValue = value;
int len = stringValue.length();
if (len > 16)
{
stringEnd = stringValue.substring(len - 16);
}
else
{
stringEnd = stringValue;
}
}
public Long getId()
{
@@ -101,4 +119,14 @@ public class PropertyStringValueEntity
{
this.stringValue = stringValue;
}
public String getStringEnd()
{
return stringEnd;
}
public void setStringEnd(String stringEnd)
{
this.stringEnd = stringEnd;
}
}