| Author |
Topic |
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-10-31 : 02:41:46
|
| Dear Experts,i've one database with around 1400 tables.is there any possibilities to know at a time what is the count(*) in each table? actually i need tables which are having maximum data.my expected result is like thistable num_rowstable1 20000table2 10000like thisthank you very muchVinodEven you learn 1%, Learn it with 100% confidence. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-31 : 04:15:31
|
| dbcc updateusageselect object_name(id) as table_name, rows from sysindexeswhere indid<2 order by rows descMadhivananFailing to plan is Planning to fail |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-10-31 : 09:10:05
|
| what is "indid" column madhi?VinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-31 : 09:14:45
|
| It is the index idMadhivananFailing to plan is Planning to fail |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-11-01 : 08:18:03
|
| Dear Madhi,why should be the indexID<2?what is the reason behind that?VinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-11-01 : 08:36:27
|
quote: Originally posted by sunsanvin Dear Madhi,why should be the indexID<2?what is the reason behind that?VinodEven you learn 1%, Learn it with 100% confidence.
Run this and seeselect indid,object_name(id) as table_name, rows from sysindexesorder by 2MadhivananFailing to plan is Planning to fail |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-11-01 : 08:46:32
|
| Yea...when the value of indexid is >=2, the rows are 0.VinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-11-01 : 09:03:14
|
| > when the value of indexid is >=2, the rows are 0.and this tells you what about indid >= 2?_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2007-12-04 : 01:32:45
|
quote: Originally posted by spirit1 > when the value of indexid is >=2, the rows are 0.and this tells you what about indid >= 2?_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com
exactly what is going inside this spirit1?....actually i didnt get the logicVinodEven you learn 1%, Learn it with 100% confidence. |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-12-04 : 05:32:07
|
| open BOL = Books Online = SQL Server Help.in the index textbox type in sysindexespress Enter.look what it say for the description of the indid column.Any clearer now?_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
|