i am using postgresql.
vhastakayit is view.
UniQuery1.SQL.Clear;
UniQuery1.SQL.Add('select * from udr.vhastakayit where protokolno>:protokolno');
UniQuery1.Params.ParamByName('protokolno').Value:=4000000;
UniQuery1.Open;
8 seconds
UniQuery1.SQL.Clear;
UniQuery1.SQL.Add('select * from udr.vhastakayit where protokolno>=:4000000 ');
UniQuery1.Open;
2 seconds
why can be happend different performance as when i send parameter?
Thanks.
query performance problem
Hello,
I tested your example, and difference between a query with param and without it was ~0.01 sec. I have tested it on 1000000 records.
Please tell me your exact version of UniDAC and send me script to create the table, and the number of records in the table to alexp*devart*com.
Also if you don't use default TUniQuery settings, please send me your settings, or send a small project to demonstrate the problem.
I tested your example, and difference between a query with param and without it was ~0.01 sec. I have tested it on 1000000 records.
Please tell me your exact version of UniDAC and send me script to create the table, and the number of records in the table to alexp*devart*com.
Also if you don't use default TUniQuery settings, please send me your settings, or send a small project to demonstrate the problem.