SELECT @rid, EmailAddress FROM Contact WHERE (OwnedBy.EntityInfo.State <> 200) AND (Account = #20:0) AND (EntityInfo.State = 0) ORDER BY EmailAddress ASC skip 100 limit 100
{
"result": [
{
"@type": "d",
"@version": 0,
"fullySortedByIndex": true,
"documentReads": 200,
"current": "#41:11015",
"documentAnalyzedCompatibleClass": 200,
"recordReads": 200,
"involvedIndexes": [
"IX_Contact_EmailAddress"
],
"fetchingFromTargetElapsed": 250,
"indexIsUsedInOrderBy": true,
"evaluated": 200,
"elapsed": 251.53171,
"resultType": "collection",
"resultSize": 100,
"@fieldTypes": "documentReads=l,current=x,documentAnalyzedCompatibleClass=l,recordReads=l,involvedIndexes=e,fetchingFromTargetElapsed=l,evaluated=l,elapsed=f"
}
],
"notification": "Query executed in 0.575 sec. Returned 1 record(s)"
}
{
"result": [
{
"@type": "d",
"@version": 0,
"fullySortedByIndex": true,
"documentReads": 110866,
"current": "#41:111016",
"documentAnalyzedCompatibleClass": 110866,
"recordReads": 110866,
"involvedIndexes": [
"IX_Contact_EmailAddress"
],
"fetchingFromTargetElapsed": 5517,
"indexIsUsedInOrderBy": true,
"evaluated": 110866,
"elapsed": 5514.2456,
"resultType": "collection",
"resultSize": 100,
"@fieldTypes": "documentReads=l,current=x,documentAnalyzedCompatibleClass=l,recordReads=l,involvedIndexes=e,fetchingFromTargetElapsed=l,evaluated=l,elapsed=f"
}
],
"notification": "Query executed in 5.835 sec. Returned 1 record(s)"
}
--
---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Lugi,I am sorry about the title, I means the SQL engine fetches more data internally.No, the account #20:0 has 120000 contacts while #20:1 only has 100000 contacts.
I will try your suggestion and give a feedback soon.
Hi Luca,The OwnedBy is a Link property, and the EntityInfo is an embedded property. I have a index on OwnedBy, but I could not create index on property of an object-embedded property (I guess that's a limitation, maybe I need to break it down to properties).
{
"result": [
{
"@type": "d",
"@version": 0,
"fetchingFromTargetElapsed": 0,
"expandElapsed": 0,
"orderByElapsed": 0,
"current": "#20:0",
"user": "#5:0",
"elapsed": 1.983832,
"resultType": "collection",
"resultSize": 0,
"@fieldTypes": "fetchingFromTargetElapsed=l,expandElapsed=l,orderByElapsed=l,current=x,user=x,elapsed=f"
}
],
"notification": "Query executed in 0.036 sec. Returned 1 record(s)"
}
{
"result": [
{
"@type": "d",
"@version": 0,
"fetchingFromTargetElapsed": 0,
"expandElapsed": 0,
"orderByElapsed": 0,
"current": "#20:0",
"user": "#5:0",
"elapsed": 1.491263,
"resultType": "collection",
"resultSize": 0,
"@fieldTypes": "fetchingFromTargetElapsed=l,expandElapsed=l,orderByElapsed=l,current=x,user=x,elapsed=f"
}
],
"notification": "Query executed in 0.043 sec. Returned 1 record(s)"
}
{
"result": [
{
"@type": "d",
"@version": 0,
"fetchingFromTargetElapsed": 0,
"expandElapsed": 0,
"current": "#20:0",
"user": "#5:0",
"elapsed": 0.981974,
"resultType": "collection",
"resultSize": 0,
"@fieldTypes": "fetchingFromTargetElapsed=l,expandElapsed=l,current=x,user=x,elapsed=f"
}
],
"notification": "Query executed in 0.044 sec. Returned 1 record(s)"
}