Closed Thread Icon

Preserved Topic: Finding the size of a table...mysql Pages that link to <a href="https://ozoneasylum.com/backlink?for=21158" title="Pages that link to Preserved Topic: Finding the size of a table...mysql" rel="nofollow" >Preserved Topic: Finding the size of a table...mysql\

 
Author Thread
Maskkkk
Paranoid (IV) Inmate

From: Willaimsport, PA, US of A the hole in the Ozone
Insane since: Mar 2002

posted posted 08-29-2002 15:55

I'm trying to find the size of a table in mysql so that I can put a limit on DOS attacks, by making it so that you can only make the table so big in any givin amount of time, is there any command that would tell me this information?

Maskkkk




- Face the Present

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 08-29-2002 17:37

if you are talking php: www.phpmyadmin.net has these features. maybe you can look at the source code and find some information on that.

but i dont know of a native php function for this. its probably some serious mathematics behind.

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 08-29-2002 18:10

What do you mean by "how big"?

Do you mean file size, or number of rows?

If you mean the number of rows, you can use PHP to tell you that -

Look at mysql_num_rows.

I don't know of a method to get that info directly from the mysql, but that doesn't mean it doesn't exist.


Maskkkk
Paranoid (IV) Inmate

From: Willaimsport, PA, US of A the hole in the Ozone
Insane since: Mar 2002

posted posted 08-29-2002 19:52

I mean how big in kilobytes, megabytes, I figured maybe there was an SQL query I could use to find that out. I'm using JSP not PHP

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 08-29-2002 19:56

i dont think there is something like this natively. but search google. chances are good someone else aready made such a thing.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 08-29-2002 20:48

"SHOW TABLE STATUS LIKE 'tablename'"

Handle the results like a normal mysql return and you should have a column named
data_length which I believe is what you are looking for.

SHOW TABLE STATUS page in the docs.



.:[ Never resist a perfect moment ]:.

Maskkkk
Paranoid (IV) Inmate

From: Willaimsport, PA, US of A the hole in the Ozone
Insane since: Mar 2002

posted posted 09-01-2002 21:26

Ah thank you bit damaged, that's just what I was looking for!

Oh and while I'm at it nice work on that tech tv site, I love it!

« BackwardsOnwards »

Show Forum Drop Down Menu