Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MATCH cypher where list OR time out query. How to query list values with MATCH? #4819

Closed
son2408 opened this issue Nov 2, 2022 · 19 comments
Closed
Labels
severity/minor Severity of bug type/bug Type: something is unexpected

Comments

@son2408
Copy link

son2408 commented Nov 2, 2022

match(v:tinhhinhdangky) where v.tinhinhdangky.NodeId == '7b619931-bb65-443e-8bec-06c1f2c381d3' or v.tinhinhdangky.NodeId == '3ca1ac1f-25e3-488f-91c4-a046830ddc2f' or v.tinhinhdangky.NodeId == '7df63b03-913f-4d52-b9fe-e81abeff994b' or v.tinhinhdangky.NodeId == 'ab38d2d6-a322-42a8-8c9d-5f0ac200cf71' or v.tinhinhdangky.NodeId == '93408712-8709-4061-a26a-7533d4cba4a3' or v.tinhinhdangky.NodeId == '7d40a300-d40d-4472-a9ba-8e8aa3940190' or v.tinhinhdangky.NodeId == '36655cc0-d623-48d5-bd87-ce774abb4401' or v.tinhinhdangky.NodeId == '41c12d06-f84e-4a7d-aaa1-41b6bb835de6' or v.tinhinhdangky.NodeId == '102ac87b-e977-4026-a70a-0dbbb912fee9' or v.tinhinhdangky.NodeId == 'fa442b75-f5f3-45ee-ac8d-1217f4b3018d' or v.tinhinhdangky.NodeId == 'ab0abac0-f510-49a5-8b8f-84f9a5d03082' or v.tinhinhdangky.NodeId == '0323248d-3bb7-4656-8e7a-d8f435748641' or v.tinhinhdangky.NodeId == '850adf1a-36fd-4ffe-b5c0-873ce10476d9' or v.tinhinhdangky.NodeId == '74d07b31-3ff4-4943-975f-17d8924df79c' or v.tinhinhdangky.NodeId == '3639ca2f-8ee0-46d0-86b1-161e69eba759' or v.tinhinhdangky.NodeId == '826d4650-5332-41a8-b0f9-b50f1ecbd845' or v.tinhinhdangky.NodeId == 'f6d9bec9-0f5e-4b89-b16a-594af701ee8b' or v.tinhinhdangky.NodeId == '59afc515-365a-4ba5-9fb4-0c32e5bd21f9' or v.tinhinhdangky.NodeId == '3c1f9c95-fbd2-4171-8df3-23deb867dab0' or v.tinhinhdangky.NodeId == '0830c0e1-f98d-4976-b0e3-3656823ce01d' or v.tinhinhdangky.NodeId == '23105566-c9cb-453a-8ae5-728d32c4a1bf' or v.tinhinhdangky.NodeId == '48e157fb-2ed2-47ba-8759-86d19f771d4f' or v.tinhinhdangky.NodeId == '5ff8d822-94ba-47b7-85e8-f7fa8e3f2590' or v.tinhinhdangky.NodeId == '96b6c94d-3838-41c8-b8a5-fcc367fe5e33' or v.tinhinhdangky.NodeId == '01080a0d-8b8c-4d22-8251-ddb68321f7cf' or v.tinhinhdangky.NodeId == 'e483823c-af19-4be3-97d2-c6e7563fd2ef' or v.tinhinhdangky.NodeId == 'c0ae9c25-6fdf-4df3-94a0-af0eac2e1aa3' or v.tinhinhdangky.NodeId == '024e9d3a-a196-40d4-9481-f20fe5f281fd' or v.tinhinhdangky.NodeId == 'dbcf341c-7904-47a6-840a-4a5e4a314448' return v.tinhhinhdangky.NodeId

@wey-gu
Copy link
Contributor

wey-gu commented Nov 2, 2022

How about

match(v:tinhhinhdangky) where v.tinhinhdangky.NodeId IN ["foo", "bar"]

@son2408
Copy link
Author

son2408 commented Nov 2, 2022

How about

match(v:tinhhinhdangky) where v.tinhinhdangky.NodeId IN ["foo", "bar"]

It query timeout, too

@son2408
Copy link
Author

son2408 commented Nov 2, 2022

How about

match(v:tinhhinhdangky) where v.tinhinhdangky.NodeId IN ["foo", "bar"]

It query timeout, too

Could you try it with your dataset, plz ?

@wey-gu
Copy link
Contributor

wey-gu commented Nov 2, 2022

Have you tried configuring the storage client timeout?

ref: https://docs.nebula-graph.io/3.2.1/20.appendix/0.FAQ/#how_to_resolve_the_error_storageclientbaseinl214_request_to_xxxx9779_failed_n6apache6thrift9transport19ttransportexceptione_timed_out_in_nebula-graphinfo

plz configure storage_client_timeout_ms in graphd.conf (not in storaged.conf)

@son2408
Copy link
Author

son2408 commented Nov 2, 2022

How about

match(v:tinhhinhdangky) where v.tinhinhdangky.NodeId IN ["foo", "bar"]

It query timeout, too

I dont think this query too slow to time out :(

@wey-gu
Copy link
Contributor

wey-gu commented Nov 2, 2022

could you share the profile/explain of the query here, and the index created?

@son2408
Copy link
Author

son2408 commented Nov 2, 2022

It's my explain

"id","name","dependencies","profiling data","operator info"
"6","Project","5","","outputVar: {
  ""colNames"": [
    ""v.tinhhinhdangky.NodeId""
  ],
  ""type"": ""DATASET"",
  ""name"": ""__Project_6""
}
inputVar: __Filter_5
columns: [
  ""v.tinhhinhdangky.NodeId""
]"
"5","Filter","8","","outputVar: {
  ""colNames"": [
    ""v""
  ],
  ""type"": ""DATASET"",
  ""name"": ""__Filter_5""
}
inputVar: __Project_4
condition: (v.tinhinhdangky.NodeId IN [""7b619931-bb65-443e-8bec-06c1f2c381d3"",""3ca1ac1f-25e3-488f-91c4-a046830ddc2f"",""7df63b03-913f-4d52-b9fe-e81abeff994b"",""ab38d2d6-a322-42a8-8c9d-5f0ac200cf71"",""93408712-8709-4061-a26a-7533d4cba4a3"",""7d40a300-d40d-4472-a9ba-8e8aa3940190"",""36655cc0-d623-48d5-bd87-ce774abb4401"",""41c12d06-f84e-4a7d-aaa1-41b6bb835de6"",""102ac87b-e977-4026-a70a-0dbbb912fee9"",""fa442b75-f5f3-45ee-ac8d-1217f4b3018d"",""ab0abac0-f510-49a5-8b8f-84f9a5d03082"",""0323248d-3bb7-4656-8e7a-d8f435748641"",""850adf1a-36fd-4ffe-b5c0-873ce10476d9"",""74d07b31-3ff4-4943-975f-17d8924df79c"",""3639ca2f-8ee0-46d0-86b1-161e69eba759"",""826d4650-5332-41a8-b0f9-b50f1ecbd845"",""f6d9bec9-0f5e-4b89-b16a-594af701ee8b"",""59afc515-365a-4ba5-9fb4-0c32e5bd21f9"",""3c1f9c95-fbd2-4171-8df3-23deb867dab0"",""0830c0e1-f98d-4976-b0e3-3656823ce01d"",""23105566-c9cb-453a-8ae5-728d32c4a1bf"",""48e157fb-2ed2-47ba-8759-86d19f771d4f"",""5ff8d822-94ba-47b7-85e8-f7fa8e3f2590"",""96b6c94d-3838-41c8-b8a5-fcc367fe5e33"",""01080a0d-8b8c-4d22-8251-ddb68321f7cf"",""e483823c-af19-4be3-97d2-c6e7563fd2ef"",""c0ae9c25-6fdf-4df3-94a0-af0eac2e1aa3"",""024e9d3a-a196-40d4-9481-f20fe5f281fd"",""dbcf341c-7904-47a6-840a-4a5e4a314448"",""15b27eab-43f3-4a62-957a-d793ca06525e"",""210a5c99-0450-4fb4-b7b1-25e2c086e006"",""cbbf7b87-fac1-491f-87b0-b4b447319505"",""c9949e30-8536-4f06-a9be-79a82e94a209"",""ddd649d1-b065-4475-9c74-e2b100f28c1e"",""03cb8089-0a95-467d-bfc1-3de39a937574"",""4ca8bd7d-5004-4134-a582-efb4c4409c64"",""b5621a9e-9e65-40a5-b024-611d201f0cc1"",""578c56c3-82b1-4090-acf4-33fb47f6645f"",""592de22b-e9fb-4901-aef6-797705c4341a"",""c48981cd-4ec8-4254-8a66-64cf12a16cae"",""94cb0a38-e63e-4414-8286-912241606002"",""b5e6b7ab-92d0-40c8-8408-171564788b50"",""6b8b09cd-51e3-4548-a343-43ce6058a233"",""5d7c6cad-4dac-450c-9ff3-d36d04239676"",""37332198-e6ea-4ee5-bc82-78fb3f268383"",""f23efda0-7a79-4a33-82c1-e29c4e6b0829"",""ebd541bc-16f2-4f08-af18-5a63a6a957be"",""f23805e4-1d49-4d37-8bbd-a2708ea2938a"",""d74d9053-d36d-449f-b9d2-f0e3438bd2b6"",""287e8cab-667d-4734-9f90-ed19dfc65228"",""c718014c-403d-4ae0-aa52-398660aa9474"",""071072ad-8306-480a-8c78-8261e7882f3f"",""fb0787d7-fb8b-42ec-bf0e-1515676ae187"",""5cda5d65-9fc8-4679-875f-4dde34d0f595"",""802e7f5a-ddae-4a41-8229-5df9404e75e7"",""6650d803-f760-4be6-a1ae-42cbdf7a2da6"",""6ae9d2f4-7c21-4fe6-b73d-a1cf1367635a"",""7e875924-4d50-4560-b6d5-3c6c4eff982f"",""4c64a36d-fa25-43b4-856e-527c47a20310"",""85536eb0-8d20-4c37-9055-ca4c0af7f887"",""07c0c6c8-c9c9-40d1-abfc-123b29d6d06e"",""b436f7ac-4192-4c4e-a6eb-873a6c153a55"",""757b9d57-d0f4-4c03-93d7-f2bc36ce5d71"",""26b7952f-7334-4be6-aa78-2f4e4017edd3"",""3e48d579-80aa-48dc-a288-865f2af83087"",""c24cbb09-7349-4173-bcf6-aacdf3f9057d"",""d3ff1f21-3e4d-4f55-8a21-b6f69e1fd625"",""41d9d38d-0ba1-4a56-a6be-e7b594682afe"",""96b5fb3b-9118-479a-be17-2afcdf645aa7"",""a025c360-3dd9-4836-ba3b-cba13711dcfc"",""16003d70-a945-4760-8ad6-67fd71cd3fbf"",""4dde9d6c-2df6-49da-a6eb-701c76187055"",""06ad4642-f97e-4a14-bb8f-da2a680550c1"",""8b265663-0b60-48a2-a364-29bf884609a1"",""6e8fad29-babb-4c73-abfc-dcdc1601bf22"",""e58e8b35-d314-4394-aef5-feec80d615bd"",""f16cbcaf-2d13-43b3-bb3a-d44fa801f889"",""cf723d54-e833-467b-861b-9e1178727147"",""0192c494-d1b0-4542-998e-506b56728e3a"",""fae114af-ba0b-48d2-ab8b-3f2fa2b0a630"",""e44eac7d-c7c8-4a05-8c56-af4f6d840e07"",""a36e8cdc-575c-4f28-9399-4655664c5d7c"",""85637f6b-f606-46bf-88b0-3c900eadccc7"",""d21bde57-b488-4646-8ee7-60317e4032ae"",""dce7f287-1143-4f8e-9927-fe497a9aa776"",""34bc958f-97f1-4409-92d1-b80ae3c451be"",""c1d84bd6-49a2-4f72-ac81-d97a729a1e5b"",""244dd738-3b73-4dbe-bcf5-1a7e2a60cc75"",""d7ce20dc-0103-4374-a417-23d6655cc01a"",""7c141c7e-be0b-4b11-af42-1022b35d6beb""])
isStable: false"
"8","AppendVertices","1","","outputVar: {
  ""colNames"": [
    ""v""
  ],
  ""type"": ""DATASET"",
  ""name"": ""__Project_4""
}
inputVar: __IndexScan_1
space: 76
dedup: true
limit: -1
filter: tinhhinhdangky._tag IS NOT EMPTY
orderBy: []
src: $_vid
props: [
  {
    ""props"": [
      ""NodeId"",
      ""_tag""
    ],
    ""tagId"": 751
  }
]
exprs: 
vertex_filter: 
if_track_previous_path: false"
"1","IndexScan","2","","outputVar: {
  ""colNames"": [
    ""_vid""
  ],
  ""type"": ""DATASET"",
  ""name"": ""__IndexScan_1""
}
inputVar: 
space: 76
dedup: false
limit: 9223372036854775807
filter: 
orderBy: []
schemaId: 751
isEdge: false
returnCols: [
  ""_vid""
]
indexCtx: [
  {
    ""columnHints"": [],
    ""filter"": """",
    ""index_id"": 1028
  }
]"
"2","Start","","","outputVar: {
  ""colNames"": [],
  ""type"": ""DATASET"",
  ""name"": ""__Start_2""
}"

@wey-gu
Copy link
Contributor

wey-gu commented Nov 2, 2022

hint, kindly help provide more readable output :)

if it's too long, plz use the latest version of console.exe (3.3.0) and redirect its output like:

console.exe -addr localhost -port 9669 -e 'profile match xxx return xxx' 1> output.log 2>nul

@wey-gu
Copy link
Contributor

wey-gu commented Nov 2, 2022

BTW, are you using the master build or?

columnHints is empty as #4708 but it's fixed in master via #4748

@son2408
Copy link
Author

son2408 commented Nov 2, 2022

@wey-gu

"id","name","dependencies","profiling data","operator info"
"6","Project","5","ver: 0, rows: 0, execTime: 6490us, totalTime: 6493us","outputVar: {
  ""colNames"": [
    ""v.tinhhinhdangky.NodeId""
  ],
  ""type"": ""DATASET"",
  ""name"": ""__Project_6""
}
inputVar: __Filter_5
columns: [
  ""v.tinhhinhdangky.NodeId""
]"
"5","Filter","8","ver: 0, rows: 0, execTime: 4360088us, totalTime: 4360091us","outputVar: {
  ""colNames"": [
    ""v""
  ],
  ""type"": ""DATASET"",
  ""name"": ""__Filter_5""
}
inputVar: __Project_4
condition: (v.tinhinhdangky.NodeId IN [""7b619931-bb65-443e-8bec-06c1f2c381d3"",""3ca1ac1f-25e3-488f-91c4-a046830ddc2f"",""7df63b03-913f-4d52-b9fe-e81abeff994b"",""ab38d2d6-a322-42a8-8c9d-5f0ac200cf71"",""93408712-8709-4061-a26a-7533d4cba4a3"",""7d40a300-d40d-4472-a9ba-8e8aa3940190"",""36655cc0-d623-48d5-bd87-ce774abb4401"",""41c12d06-f84e-4a7d-aaa1-41b6bb835de6"",""102ac87b-e977-4026-a70a-0dbbb912fee9"",""fa442b75-f5f3-45ee-ac8d-1217f4b3018d"",""ab0abac0-f510-49a5-8b8f-84f9a5d03082"",""0323248d-3bb7-4656-8e7a-d8f435748641"",""850adf1a-36fd-4ffe-b5c0-873ce10476d9"",""74d07b31-3ff4-4943-975f-17d8924df79c"",""3639ca2f-8ee0-46d0-86b1-161e69eba759""])
isStable: false"
"8","AppendVertices","1","{
ver: 0, rows: 5105895, execTime: 12702902us, totalTime: 43442911us
""10.225.0.32"":9779 exec/total: 28182324(us)/35747412(us)
total_rpc: 36958676(us)
}","outputVar: {
  ""colNames"": [
    ""v""
  ],
  ""type"": ""DATASET"",
  ""name"": ""__Project_4""
}
inputVar: __IndexScan_1
space: 76
dedup: true
limit: -1
filter: tinhhinhdangky._tag IS NOT EMPTY
orderBy: []
src: $_vid
props: [
  {
    ""props"": [
      ""NodeId"",
      ""_tag""
    ],
    ""tagId"": 751
  }
]
exprs: 
vertex_filter: 
if_track_previous_path: false"
"1","IndexScan","2","{
ver: 0, rows: 5105895, execTime: 0us, totalTime: 4949042us
""10.225.0.32"":9779 exec/total: 3423338(us)/4499967(us)
storage_detail: {IndexLimitNode(limit=9223372036854775807):3028090(us),IndexProjectionNode(projectColumn=[_vid]):2914208(us),IndexVertexScanNode(IndexID=1028, Path=()):1979642(us)}
}","outputVar: {
  ""colNames"": [
    ""_vid""
  ],
  ""type"": ""DATASET"",
  ""name"": ""__IndexScan_1""
}
inputVar: 
space: 76
dedup: false
limit: 9223372036854775807
filter: 
orderBy: []
schemaId: 751
isEdge: false
returnCols: [
  ""_vid""
]
indexCtx: [
  {
    ""columnHints"": [],
    ""filter"": """",
    ""index_id"": 1028
  }
]"
"2","Start","","ver: 0, rows: 0, execTime: 0us, totalTime: 23us","outputVar: {
  ""colNames"": [],
  ""type"": ""DATASET"",
  ""name"": ""__Start_2""
}"

@son2408
Copy link
Author

son2408 commented Nov 2, 2022

BTW, are you using the master build or?

columnHints is empty as #4708 but it's fixed in master via #4748

Nebula version 3.3 fixed ?

@wey-gu
Copy link
Contributor

wey-gu commented Nov 2, 2022

Yes, 3.3.0 will include this fix.

@wey-gu
Copy link
Contributor

wey-gu commented Nov 2, 2022

Please also share the index you created and try with where v.tinhinhdangky.NodeId == '7b619931-bb65-443e-8bec-06c1f2c381d3' for one item to see if it's with columnHints?

@son2408
Copy link
Author

son2408 commented Nov 2, 2022

Please also share the index you created and try with where v.tinhinhdangky.NodeId == '7b619931-bb65-443e-8bec-06c1f2c381d3' for one item to see if it's with columnHints?

(root@nebula) [HCMLIS2]> describe tag index idx_v_tinhhinhdangky_nodeid
+----------+--------------------+
| Field    | Type               |
+----------+--------------------+
| "NodeId" | "fixed_string(36)" |
+----------+--------------------+
Got 1 rows (time spent 1.237ms/2.5864ms)

@wey-gu
Copy link
Contributor

wey-gu commented Nov 2, 2022

Please also share the index you created and try with where v.tinhinhdangky.NodeId == '7b619931-bb65-443e-8bec-06c1f2c381d3' for one item to see if it's with columnHints?

(root@nebula) [HCMLIS2]> describe tag index idx_v_tinhhinhdangky_nodeid
+----------+--------------------+
| Field    | Type               |
+----------+--------------------+
| "NodeId" | "fixed_string(36)" |
+----------+--------------------+
Got 1 rows (time spent 1.237ms/2.5864ms)

thanks, looks good to me, the IN ["foo","bar"] should have columnHint in index scan with this index in master/3.3.0.

@son2408
Copy link
Author

son2408 commented Nov 2, 2022

Please also share the index you created and try with where v.tinhinhdangky.NodeId == '7b619931-bb65-443e-8bec-06c1f2c381d3' for one item to see if it's with columnHints?

(root@nebula) [HCMLIS2]> describe tag index idx_v_tinhhinhdangky_nodeid
+----------+--------------------+
| Field    | Type               |
+----------+--------------------+
| "NodeId" | "fixed_string(36)" |
+----------+--------------------+
Got 1 rows (time spent 1.237ms/2.5864ms)

thanks, looks good to me, the IN ["foo","bar"] should have columnHint in index scan with this index in master/3.3.0.

ok thansk @wey-gu, I will upgrade version 3.3

@son2408
Copy link
Author

son2408 commented Nov 2, 2022

Please also share the index you created and try with where v.tinhinhdangky.NodeId == '7b619931-bb65-443e-8bec-06c1f2c381d3' for one item to see if it's with columnHints?

(root@nebula) [HCMLIS2]> describe tag index idx_v_tinhhinhdangky_nodeid
+----------+--------------------+
| Field    | Type               |
+----------+--------------------+
| "NodeId" | "fixed_string(36)" |
+----------+--------------------+
Got 1 rows (time spent 1.237ms/2.5864ms)

thanks, looks good to me, the IN ["foo","bar"] should have columnHint in index scan with this index in master/3.3.0.

btw, could you explain me, what is columnHint ?

@wey-gu
Copy link
Contributor

wey-gu commented Nov 2, 2022

Sure, @son2408 and welcome!!!

columnHint is a field to let index scan processor know more information that may help hint on the data scan, just think of it's the argument of a indexScan function, thus to scan data based on hint will always be cheaper.

@son2408
Copy link
Author

son2408 commented Nov 2, 2022

Sure, @son2408 and welcome!!!

columnHint is a field to let index scan processor know more information that may help hint on the data scan, just think of it's the argument of a indexScan function, thus to scan data based on hint will always be cheaper.

thanks @wey-gu

@Sophie-Xie Sophie-Xie added the type/question Type: question about the product label Nov 3, 2022
@shanlai shanlai added type/bug Type: something is unexpected severity/minor Severity of bug and removed type/question Type: question about the product labels Nov 11, 2022
@wey-gu wey-gu closed this as completed Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/minor Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

4 participants