Hi all,
We are facing a strange performance problem with "SQL Server Express 2005" in a very simple condition.
We have a table with: [timestamp], [id], [value] columns. and only one primary unique index on [timestamp]+[id].
The table contains around 68.000.000 records.
The request is: SELECT TOP 1 timestamp FROM table WHERE id=1234 ORDER BY timestamp
If there is at least one record for this id the result is given in few miliseconds. If there is no record for this id the result is given in at least 30 SECONDS!!!
We tried many other simple similar request, and as soon as we have no corresponding records for the id the processing time is awfully long.
Do you have any explanation and idea to avoid this?
Thanks.