Slow data fetch from MSSQL via SP
Posted: Fri 24 Jun 2022 10:42
Hi,
I'm using Unidac 9.1.1. with Delphi 10.3, connecting to MSSQL 2014. I have SP that returns just resultset (no updates or inserts). Calling open with TUniQuery takes very long time.... as I tested, problem is with float fields (resultset has few string and 10 float fields returned in resultet). Select is using CTE for all float fields, one is calculated.
If I remove float fields from resultset, query gets result in few ms... In moment when just 1 float is added to resultset, time is 20s....
When same select is put in query SQL, with all fields, resultset is retrieved in 0.2 sek.
Any ideas?
Best regards, Tone
I'm using Unidac 9.1.1. with Delphi 10.3, connecting to MSSQL 2014. I have SP that returns just resultset (no updates or inserts). Calling open with TUniQuery takes very long time.... as I tested, problem is with float fields (resultset has few string and 10 float fields returned in resultet). Select is using CTE for all float fields, one is calculated.
If I remove float fields from resultset, query gets result in few ms... In moment when just 1 float is added to resultset, time is 20s....
When same select is put in query SQL, with all fields, resultset is retrieved in 0.2 sek.
Any ideas?
Best regards, Tone