Param query very slow

When opening TxDataset with following SQL, query takes about 30 seconds to execute in table with 2.500 rows (SQL Server Express):

WHERE maker = 'Porsche' AND
wrecked IS NULL AND
driver =:ownersName
ORDER By year, miles

When running this SQL, it takes 3-4 seconds


Any idea what can be done to make query with params to run faster?

Is this just a single SQL statement? If yes, I don't think it's related to RemoteDB. Maybe your database needs an index to retrieve data faster?

Yes, that must be reason. Played little more with querys after reading your answer and noticed that query speed is related to numbers of rows what it returns.

Tryed to create index to SQL Express but it ended to error. Don't bother to examine it more, SQL Express been only for testing purposes. Going to move to Interbase at some point.

Thanks for fast reply.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.