I have a weird situation here. I have a complex query which should take approximately 10 seconds to retrieve about 6000 rows from the database.
Query version 1:
SELECT * from .....
In above version, it takes about 10 seconds to get 6000 rows from the database (I am talking about running the query in SQL management studio)
Query version 2:
SELECT [FieldName1], [FieldName2] from .....
In the above version (2), it takes more than an hour or even more to get the results (6000 rows) from the database (I am talking about running the query in SQL management studio)
Both the queries have same joins and where conditions.
Can anyone shed some light on this please?
Thanks.
Regards, Nayan