SQL database usage not correct please help

Discussion in 'Databases' started by JorgeR, Feb 16, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. JorgeR

    JorgeR DiscountASP.NET Staff

    The reason for this type of issue is because of database defragmentation. You will need to look at the design of the database and make sure that proper indexing (at least 1 cluster index is in place). If proper indexing is in place, then you can issue the dbcc dbreindex or dbcc indexdefrag command (SQL BOL for information) to help with the physical fragmentation of the database.

    Without going into details on the internal working of SQL server, you will need to optimize your database. By optimization, we are referring that you will need to create indexes on your database. Although you see that there is space, internally SQL is not allowed to grant more space then the assigned space because the way the data is positioned internally. An example to better explain it is as follows: You are writing a 20 page gallery book and the pages are spread on the table so that you can placed in them in order and see the gallery images. Although you know more then 20 pages can fit on the table, you are not able to use more space because the gallery pages are are spread on the table and there is no more room. Now if the pages where indexed and already in order (OPTIMIZED- clustered index), you can stack them in one pile and regain your space. You can then add more gallery pages onto the table and be able access directly the desire image without searching through the pile all over the table. Please make sure that your database is properly indexed. They should be at least 1 clustered index per table


    junior

    DiscountASP.NET

    www.DiscountASP.NET
     
  2. Hi,

    I have noticed that I am always having to buy more SQL database I am currently up to 547 mb. However the total size of my files in use are only about 80mb. I have no idea where the rest of the data is being used. I have tried to shrink my database but nothing happens. Could anyone please point me in the right direction?

    Thanks Mark

    markatcosmeticsos.com
     
  3. Thank you, but asa non programmer how do I do this. Is it simple or do you need experience?





    Cheers
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page