Thanks dear.. that error is gone.. If this does table scan, then a lot of time will be taken as i have thousands of tables.. right?
Could u please tell me onething.. which choice will be faster..
1)using sysobjects and sysindexes or
2)using sys.objects and sys.indexes and sys.partitions ( this has some join for getting the row count also)
right now sysobjects and sysindexes are being used. Its working fine in local dbserver. But its taking too much time when executing in the production dbserver. I guessed it is due to these system tables. so i requested ur help to rewrite the code with sys.objects and sys.indexes and sys.partitions. If we go in this way, will it take more time?
or Could you please have a guess.. what may be the problem behind this. Is it really due to system tables?
or If the size of the system tables is large, then this time out happens??