In SQL Server while writing a Query , I noticed that the data in Inner Query which is a derived table when joined with another table is taking long. The keys joined to the outer table is on Primary Key. So I was surprised since the data was about 10,000 records and 15 Columns. But if we store the data from derived table in a temp table and then JOIN the Performance was less than 2 Seconds. It made me wonder what the reason would be ?
Aucun commentaire:
Enregistrer un commentaire