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.
Asked
Active
Viewed 55 times
1
-
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 Answers
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
-
does dic means hardrive ? TB's and can i store as much value i want in cell , if datatype=text – HRMNS Aug 19 '12 at 06:13
-
-
It's a setting in `/etc/my.cnf`. Read the MySQL server documentation for more details. – tadman Aug 20 '12 at 00:23
-
Not unless you've done something really crazy. By default MySQL tables are only readable by the `mysql` user. – tadman Aug 20 '12 at 14:44