November 23, 2010 at 3:38 pm
Hello,
I have a big table 50MB containing just 1000 records ( a few small fields each record).
On indexes I have one primary key and one clustered index, which I rebuilt
but the table size stays the same, big
What could be the explanation? Any hint is welcomed.
Thanks,
Iulian
November 23, 2010 at 3:48 pm
Do you have any columns of this type??
text, ntext, varchar(max), varbinary(max).
Do you have other indexes besides those 2?
Why is having that table at 50MB a problem (other than being odd).
November 23, 2010 at 3:49 pm
Is the fill factor on the indexes very low?
Do you have any columns of datatype TEXT, NTEXT, IMAGE, NVARCHAR(MAX), VARCHAR(MAX), or VARBINARY(MAX)?
November 23, 2010 at 3:52 pm
Iulian -207023 (11/23/2010)
Hello,I have a big table 50MB containing just 1000 records ( a few small fields each record).
On indexes I have one primary key and one clustered index, which I rebuilt
but the table size stays the same, big
What could be the explanation? Any hint is welcomed.
Thanks,
Iulian
Post the table CREATE statement.
CREATE TABLE Big (Firstname VARCHAR(MAX)), ....
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
November 23, 2010 at 4:13 pm
I have a few columns: nvarchar(255) and a few with varchar(50) could this be the cause?
50MB is not such a bog size I just can not explain how 1000 rows need so much space.
It might be that along the time operations made the table grow but, if so, how to take back that space?
Thanks,
Iulian
November 23, 2010 at 4:14 pm
I am sorry Chris I don't have the table structure at hand.
Thanks,
Iulian
November 23, 2010 at 4:21 pm
Iulian -207023 (11/23/2010)
I am sorry Chris I don't have the table structure at hand.Thanks,
Iulian
Need to see the build script and DDL to truly answer your question, or at least tell you where to look. Could be anything from a Fillfactor = 5% to an unexpected LOB field, to strangeness in the index.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 23, 2010 at 4:38 pm
Thanks Craig you already helped me.
I will check tomorrow the options you mentioned: LOB fields - as far as I remember there is none - but holly double check :-), fill factor and review indexes.
Thanks all,
Iulian
November 23, 2010 at 10:28 pm
Iulian -207023 (11/23/2010)
I am sorry Chris I don't have the table structure at hand.Thanks,
Iulian
Heh... you know how much the table is using for space and can't generate the script for the table or even run sp_help on the table? 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
November 24, 2010 at 2:43 am
Hi Jeff, it was about 50MB - not sure exactly.
Now the size is 0.28MB - which is great.
I dropped one unclustered index and left only the primary key index
then created a clustered index for the columns I know are most used in WHERE clause.
I settled the fill factor to 85%.
I also checked the LOB fields - here it was OK, no LOB fields.
It seems that table size does not change immediately, might this be because of the statistics update frequency?
Thanks a lot,
Iulian
November 24, 2010 at 12:18 pm
Iulian -207023 (11/24/2010)
It seems that table size does not change immediately, might this be because of the statistics update frequency?Iulian
If you are using sp_spaceused you will often get out of date values. sp_spaceused is updated when update stats runs, and if the table changes don't cause an update stats event you will have old figures.
Cheers
Leo
Leo
Nothing in life is ever so complicated that with a little work it can't be made more complicated.
November 24, 2010 at 2:37 pm
Thank you Leo,
I was looking at table properties, but I will try also sp_spaceused in the future.
Regards,
Iulian
November 24, 2010 at 2:45 pm
Iulian -207023 (11/24/2010)
Hi Jeff, it was about 50MB - not sure exactly.Now the size is 0.28MB - which is great.
I dropped one unclustered index and left only the primary key index
then created a clustered index for the columns I know are most used in WHERE clause.
I settled the fill factor to 85%.
I also checked the LOB fields - here it was OK, no LOB fields.
It seems that table size does not change immediately, might this be because of the statistics update frequency?
Thanks a lot,
Iulian
Ummm... I'm confused. I thought you said the table already had a clustered index.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 24, 2010 at 3:06 pm
That is really great, thanks a lot Jeff for leading me here.
Cheers,
Iulian
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply