Go Back   Rhinocerus > Newsgroup > Newsgroup comp.databases.mysql

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 06-22-2012, 05:38 AM
$BN4B@0KF#(B
Guest
 
Posts: n/a
Default How to calculate Table Index Size estimate ?

Hi

I want to calculate Table Index estimate.
Please teach me how to do that!!

I think that it below$B"-(Bexactly?

column size for Index * Table records size = Table index Size estimate

best regards!
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 06-22-2012, 09:10 AM
Brian Cryer
Guest
 
Posts: n/a
Default Re: How to calculate Table Index Size estimate ?

"$BN4B@0KF#(B" <ipdragon181818@gmail.com> wrote in message
news:b47e9047-af58-4b72-bfec-61e9810257ff@googlegroups.com...
> Hi
>
> I want to calculate Table Index estimate.
> Please teach me how to do that!!
>
> I think that it below$B"-(Bexactly?
>
> column size for Index * Table records size = Table index Size estimate
>
> best regards!


Others will correct me if I'm wrong, but the best you will be able to do is
to provide an ESTIMATE, you won't be able to get it exactly. The reason is
that the space taken up by an index will change as records are added and
deleted even if the total number of records remains the same.

I would expect an estimate to be closer to:
(field size for index fields + field size for primary key fields + other
over head) x number of records

A better approach is probably to play with some sample data and extract real
figures from that and use that as a basis for your estimate. The following
query will list all the tables in your database together with the data size
and index size:

SELECT table_name,engine,
ROUND(data_length/1024/1024,2) total_size_mb,
ROUND(index_length/1024/1024,2) total_index_size_mb, table_rows
FROM information_schema.TABLES
WHERE table_schema = Database()

Hope this helps.
--
Brian Cryer
http://www.cryer.co.uk/brian

Reply With Quote
  #3 (permalink)  
Old 06-28-2012, 02:43 PM
Captain Paralytic
Guest
 
Posts: n/a
Default Re: How to calculate Table Index Size estimate ?

On Jun 22, 10:10 am, "Brian Cryer" <not.h...@localhost.invalid> wrote:
> "$BN4B@0KF#(B" <ipdragon181...@gmail.com> wrote in message
>
> news:b47e9047-af58-4b72-bfec-61e9810257ff@googlegroups.com...
>
> > Hi

>
> > I want to calculate Table Index estimate.
> > Please teach me how to do that!!

>
> > I think that it below$B"-(Bexactly?

>
> > column size for Index * Table records size = Table index Size estimate

>
> > best regards!

>
> Others will correct me if I'm wrong, but the best you will be able to do is
> to provide an ESTIMATE, you won't be able to get it exactly.


So the OP says he wants to calculate a "Table index Size estimate" and
you warn him that " the best you will be able to do is to provide an
ESTIMATE".

Just which part of him saying that all he expected to get was an
estimate wasn't clear?
Reply With Quote
  #4 (permalink)  
Old 06-28-2012, 04:16 PM
Brian Cryer
Guest
 
Posts: n/a
Default Re: How to calculate Table Index Size estimate ?

"Captain Paralytic" <paul_lautman@yahoo.com> wrote in message
news:4f1d6117-4bfb-4ab0-a5dd-8857bb13325b@b1g2000vbb.googlegroups.com...
> On Jun 22, 10:10 am, "Brian Cryer" <not.h...@localhost.invalid> wrote:
>> "$BN4B@0KF#(B" <ipdragon181...@gmail.com> wrote in message
>>
>> news:b47e9047-af58-4b72-bfec-61e9810257ff@googlegroups.com...
>>
>> > Hi

>>
>> > I want to calculate Table Index estimate.
>> > Please teach me how to do that!!

>>
>> > I think that it below$B"-(Bexactly?

>>
>> > column size for Index * Table records size = Table index Size estimate

>>
>> > best regards!

>>
>> Others will correct me if I'm wrong, but the best you will be able to do
>> is
>> to provide an ESTIMATE, you won't be able to get it exactly.

>
> So the OP says he wants to calculate a "Table index Size estimate" and
> you warn him that " the best you will be able to do is to provide an
> ESTIMATE".
>
> Just which part of him saying that all he expected to get was an
> estimate wasn't clear?


Since the OP used the word "exactly" I was making it clear that the best you
can get is an estimate. Since the script used in the OP's name would
indicate that English might not be his/her first language, I thought it
worth emphasising the point.

BTW: Your email doesn't look like its munged, is that intentional?
--
Brian Cryer
http://www.cryer.co.uk/brian

Reply With Quote
  #5 (permalink)  
Old 07-02-2012, 12:23 PM
Captain Paralytic
Guest
 
Posts: n/a
Default Re: How to calculate Table Index Size estimate ?

On Jun 28, 5:16 pm, "Brian Cryer" <not.h...@localhost.invalid> wrote:
> "Captain Paralytic" <paul_laut...@yahoo.com> wrote in message
>
> news:4f1d6117-4bfb-4ab0-a5dd-8857bb13325b@b1g2000vbb.googlegroups.com...
>
>
>
>
>
>
>
>
>
> > On Jun 22, 10:10 am, "Brian Cryer" <not.h...@localhost.invalid> wrote:
> >> "$BN4B@0KF#(B" <ipdragon181...@gmail.com> wrote in message

>
> >>news:b47e9047-af58-4b72-bfec-61e9810257ff@googlegroups.com...

>
> >> > Hi

>
> >> > I want to calculate Table Index estimate.
> >> > Please teach me how to do that!!

>
> >> > I think that it below$B"-(Bexactly?

>
> >> > column size for Index * Table records size = Table index Size estimate

>
> >> > best regards!

>
> >> Others will correct me if I'm wrong, but the best you will be able to do
> >> is
> >> to provide an ESTIMATE, you won't be able to get it exactly.

>
> > So the OP says he wants to calculate a "Table index Size estimate" and
> > you warn him that " the best you will be able to do is to provide an
> > ESTIMATE".

>
> > Just which part of him saying that all he expected to get was an
> > estimate wasn't clear?

>
> Since the OP used the word "exactly" I was making it clear that the best you
> can get is an estimate.

He meant is this exactly the right way to do it.
Reply With Quote
  #6 (permalink)  
Old 07-02-2012, 12:24 PM
Captain Paralytic
Guest
 
Posts: n/a
Default Re: How to calculate Table Index Size estimate ?

On Jun 28, 5:16*pm, "Brian Cryer" <not.h...@localhost.invalid> wrote:
> "Captain Paralytic" <paul_laut...@yahoo.com> wrote in message
> BTW: Your email doesn't look like its munged, is that intentional?


Yep it is intentional. I don't often use my yahoo mail so I don't tend
to mind how much spam it gets.
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 06:37 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.