2

This is a bit ambiguous and I think relies more on your own personal experience so any input is welcome.

I have a database X and within X is table Y. Table Y has become very large(1.1 million rows) and it can not be refactored anymore than it already has.

So... within your experience how much further can this table grow before I begin seeing problems(if any) occurring and what are those problems likely to be?

Ne Ma
  • 1,719
  • 13
  • 19

2 Answers2

2

Why would a mere 1.1 million rows cause problems? Most (if not all) RDBMS'es can handle many, many more (like billions) as long as storage etc. suffices ofcourse and as long as the partition can handle files of considerable size (e.g. Fat32 only supports up to 2GB per file for example).

Also; you need to be more specific on what you're referring to when saying "before I begin seeing problems(if any)". What kind of problems? You might already have problems if you're not using correct indices for example which might slow queries down. That might be a problem but can, in some cases, also be fine.

Another issue that might actualy be a problem is stuff like an autoincrement primary key field of type (unsigned) int which might overflow at values around 2.1 (signed) or 4.2 billion rows (unsigned) but since you're at 1.1 million rows currently that is way outside of what to worry about now. (Exact values are, ofcourse, 231-1 and 232-1 respectively for signed and unsigned int). In that case you'll have to think about using types like bigint or others (maybe even (var)char etc.) for your PK.

The only thing interesting here, for MySQL specifically, could be: are you using InnoDB or MyISAM? I don't know the exact details since I'm not usually working with MySQL but I seem to remember that MyISAM can cause trouble (probably in old(er) versions like <5.0 or something). Correct me if I'm wrong. Edit: read up here. MyISAM supports a max. of 232 rows apparently, unless compiled with specific options.

Community
  • 1
  • 1
RobIII
  • 8,488
  • 2
  • 43
  • 93
  • Why would it cause problems? I am not a dba and my experience is limited to smaller tables sizes, hence why I am asking for your experience. Seeing any problems..: This is really an open ended question to ask what if any problems I may occur. As for inno/isam point: its Inno. – Ne Ma Mar 26 '13 at 11:47
  • Accepted as correct(best answer) based on the most possible areas where there could be cause for concern. – Ne Ma Mar 28 '13 at 11:52
0

It depends on the operating system being used. For older systems the typical issue is the maximum file size. The maximum 32 bit addressing of filesystems (e.g. FAT32) employed by older versions of operating systems could not seek past 2GB.

See Maximum table size documentation.

suspectus
  • 16,548
  • 8
  • 49
  • 57
  • Your explanation is misleading: the maximum 32 bit addressing of older operating systems could not seek past 2GB **only when using FAT or FAT32 filesystems**. – Jocelyn Mar 26 '13 at 11:12
  • 1
    Thanks - I will correct. Note though the `2GB` limit can also apply to older `linux` and `unix` systems. – suspectus Mar 26 '13 at 11:16
  • Thanks for your comments, in this situation its a 64 bit ubuntu server box so in this situation would not apply. Although very interesting to know that the older nix distros suffered the 2gb limitation as well as fat/fat32 file systems. – Ne Ma Mar 26 '13 at 11:46