I have the below flexible search query
我有以下灵活的搜索查询
Select {vt:code},{vt:productcode},{vw:code},{vw:productcode} from {abcd AS vt JOIN wxyz AS vw ON {vt:imeinumber} = {vw:ssnout} } where {vt:productcode} != {vw:productcode}
In my local system the Data base is HSQL so the query is not working and staying in waiting condition where as in cloud server the database is HANA so there it is working perfectly and giving exact result.
在我的本地系统中,数据库是HSQL,因此查询无法正常运行并处于等待状态,因为在云服务器中数据库是HANA,因此它可以正常工作并提供准确的结果。
2 个解决方案
#1
1
The query takes a long time to run probably because there is no index on the join column ssnout
.
查询需要很长时间才能运行,因为连接列ssnout上没有索引。
You can create an index with a statement like the one blow, using the correct table and column names.
您可以使用正确的表和列名称创建一个带有类似声明的语句的索引。
CREATE INDEX idx_ssnout ON WZYZ(SSNOUT)
#2
0
Try with JOIN instead of INNER JOIN
尝试使用JOIN而不是INNER JOIN
SELECT {vt.code},{vt.productcode},{vw.code},{vw.productcode}
FROM
{
abcd AS vt JOIN wxyz AS vw ON {vt.imeinumber} = {vw.ssnout}
}
WHERE {vt.productcode} != {vw.productcode}
#1
1
The query takes a long time to run probably because there is no index on the join column ssnout
.
查询需要很长时间才能运行,因为连接列ssnout上没有索引。
You can create an index with a statement like the one blow, using the correct table and column names.
您可以使用正确的表和列名称创建一个带有类似声明的语句的索引。
CREATE INDEX idx_ssnout ON WZYZ(SSNOUT)
#2
0
Try with JOIN instead of INNER JOIN
尝试使用JOIN而不是INNER JOIN
SELECT {vt.code},{vt.productcode},{vw.code},{vw.productcode}
FROM
{
abcd AS vt JOIN wxyz AS vw ON {vt.imeinumber} = {vw.ssnout}
}
WHERE {vt.productcode} != {vw.productcode}