1

In table there are lot's of rows keeps on increasing as it depends on visitors. Please, suggest me any method to check whether the table can store more or not. If not I would make a new table.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
HRMNS
  • 60
  • 9
  • RTFM? http://dev.mysql.com/doc/refman/5.6/en/table-size-limit.html – Marc B Aug 19 '12 at 03:04
  • What is the data type of the primary key? – Vic Aug 19 '12 at 03:06
  • i have some constraints , how can i remove them .. for eg .id(11) how i can make it to more id(xxxx). – HRMNS Aug 19 '12 at 03:08
  • The argument to integer types in MySQL doesn't mean it's a constraint. This is a common misunderstanding. See my answer to https://stackoverflow.com/questions/3135804/types-in-mysql-bigint20-vs-int20/3135854#3135854 – Bill Karwin Dec 18 '17 at 23:06

1 Answers1

2

MySQL can generally accept more data until you run out of disk space. Keep in mind that in order for best performance you may want to run OPTIMIZE TABLE once in a while, but to do that you will need to have enough disk space available to make a complete copy of that table.

If you're using InnoDB then all of the data is stored in the same file by default. Removing data never shrinks this, not without dumping and restoring your database. There's an option, innodb_file_per_table, that saves each table into several files, which may be more efficient in your case. If you drop any given table, the space it occupies is immediately reclaimed.

If you want to know how much space your data is taking up, run:

SHOW TABLE STATUS
tadman
  • 208,517
  • 23
  • 234
  • 262