Hello!
I had a problem with low performance sqlQuery query :
Select
(
Select Count(*) + 1 from "История список" as g where g._x041a__x043e__x043c__x0443_= h1._x041e__x0442__x0020__x043a__x04
)
h1.Title
(h1.id * 1000000000000000 + h1.Title * 1000000 + (
h1._x041a__x043e__x0433__x0434__x04
h1._x041e__x0442__x0020__x043a__x04
h1._x041a__x043e__x043c__x0443_
and datetime(g._x041a__x043e__x0433__x0434__x04) < datetime(h1._x041a__x043e__x0433__x0434__x04)as NumRow,as Doc_ID,CASE WHEN h1._x041a__x043e__x043c__x0443_ID IS NULL THEN 0 ELSE h1._x041a__x043e__x043c__x0443_ID END)) as MessageID,as WhenGiven,as WhoGiven,as WhomGiven
from
"История список" as h1
In this querry in prosess of calculation field "numRow" I use groupping and calculation quantity of records. Without calculation of this field query working very fast.
Whether it is possible to accelerate execution performance of the given query with usage of the subquery which is counting up a record count in the same table. Or any other ideas about uping performance of this query.
Thanks,
Roman