dbTalk Databases Forums  

How to calculate Table Index Size estimate ?

comp.databases.mysql comp.databases.mysql


Discuss How to calculate Table Index Size estimate ? in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
$BN4B@0KF#(B
 
Posts: n/a

Default How to calculate Table Index Size estimate ? - 06-22-2012 , 12:38 AM






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
  #2  
Old   
Brian Cryer
 
Posts: n/a

Default Re: How to calculate Table Index Size estimate ? - 06-22-2012 , 04:10 AM






"$BN4B@0KF#(B" <ipdragon181818 (AT) gmail (DOT) com> wrote

Quote:
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  
Old   
Captain Paralytic
 
Posts: n/a

Default Re: How to calculate Table Index Size estimate ? - 06-28-2012 , 09:43 AM



On Jun 22, 10:10 am, "Brian Cryer" <not.h... (AT) localhost (DOT) invalid> wrote:
Quote:
"$BN4B@0KF#(B" <ipdragon181... (AT) gmail (DOT) com> wrote in message

news:b47e9047-af58-4b72-bfec-61e9810257ff (AT) googlegroups (DOT) 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  
Old   
Brian Cryer
 
Posts: n/a

Default Re: How to calculate Table Index Size estimate ? - 06-28-2012 , 11:16 AM



"Captain Paralytic" <paul_lautman (AT) yahoo (DOT) com> wrote

Quote:
On Jun 22, 10:10 am, "Brian Cryer" <not.h... (AT) localhost (DOT) invalid> wrote:
"$BN4B@0KF#(B" <ipdragon181... (AT) gmail (DOT) com> wrote in message

news:b47e9047-af58-4b72-bfec-61e9810257ff (AT) googlegroups (DOT) 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  
Old   
Captain Paralytic
 
Posts: n/a

Default Re: How to calculate Table Index Size estimate ? - 07-02-2012 , 07:23 AM



On Jun 28, 5:16 pm, "Brian Cryer" <not.h... (AT) localhost (DOT) invalid> wrote:
Quote:
"Captain Paralytic" <paul_laut... (AT) yahoo (DOT) com> wrote in message

news:4f1d6117-4bfb-4ab0-a5dd-8857bb13325b (AT) b1g2000vbb (DOT) googlegroups.com...









On Jun 22, 10:10 am, "Brian Cryer" <not.h... (AT) localhost (DOT) invalid> wrote:
"$BN4B@0KF#(B" <ipdragon181... (AT) gmail (DOT) com> wrote in message

news:b47e9047-af58-4b72-bfec-61e9810257ff (AT) googlegroups (DOT) 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  
Old   
Captain Paralytic
 
Posts: n/a

Default Re: How to calculate Table Index Size estimate ? - 07-02-2012 , 07:24 AM



On Jun 28, 5:16*pm, "Brian Cryer" <not.h... (AT) localhost (DOT) invalid> wrote:
Quote:
"Captain Paralytic" <paul_laut... (AT) yahoo (DOT) 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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.