Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Database Size
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Titre:
Divers
Thread ID:
00869687
Message ID:
00869979
Vues:
21
run: DBCC UPDATEUSAGE('northwind') WITH COUNT_ROWS



>>I just saw the thread posed about getting the sizes of all the tables in a database. I thought the code could be improved by eliminating the cursor and temp table. I posted it on the sqlteam forum, feel free to snatch it.
>>
>>http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=31999
>
>Hi Eric,
>
>Below is result of running your code against NorthWind DB. As you can see, tables witn non-clustered indexes have two lines in result.
>
>
id          name                 rowcnt   reserved    data        indexp      unused
>----------- -------------------- -------- ----------- ----------- ----------- -----------
>21575115    Orders               0        504         160         320         24
>21575115    Orders               830      504         160         320         24
>325576198   Order Details        0        328         72          208         48
>325576198   Order Details        2155     328         72          208         48
>1977058079  Employees            0        320         232         48          40
>1977058079  Employees            9        320         232         48          40
>2041058307  Categories           0        176         112         32          32
>2041058307  Categories           8        176         112         32          32
>2073058421  Customers            0        104         24          80          0
>2073058421  Customers            91       104         24          80          0
>117575457   Products             0        104         8           96          0
>117575457   Products             77       104         8           96          0
>2137058649  Suppliers            0        72          24          48          0
>2137058649  Suppliers            29       72          24          48          0
>1093578934  dtproperties         7        64          48          16          0
>885578193   Region               4        32          8           24          0
>901578250   Territories          53       32          8           24          0
>917578307   EmployeeTerritories  49       32          8           24          0
>2105058535  Shippers             3        24          8           16          0
>
>(19 row(s) affected)
>
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform