At 06:32 AM 8/3/2006, Ratheesh K J wrote:

Hello all,

Just wanted to know how many columns are preferable in table. At present we are having nearly 50 - 60 columns in some of the tables. Is this ok or should we be splitting the tables for normalization.

If we really need to split then how better would it be in terms of performance.?

1) Splitting into related tables would then require Joins for data retrieval
2) Inserts/ updates will have to be done on more than one table now

It would be great to also know the best practices on number of rows that a table must hold.


Ratheesh Bhat K J


Read up on database normalization - there are benefits other than speed.

Retrieval is very fast when tables are appropriately indexed, so that's a non-issue. Similarly once a query is defined it's usually the conditions in the WHERE clause that change, so that is a non-issue as well.

With data normalized to third normal form, is you have to revise your structure or change the data you are storing, you will not break your application or your existing queries.

You may find, after normalizing your data, that you want to de-normalize part of it, at least you are doing so with full awareness of what it looks like in normal form.

As for number of rows - check the archives. There are tables with millions of rows, their number is generally not an issue. Remember that if a database grows and grows and grows, then suddenly performance hits the wall, you've likely reached the limits of the hardware it's running on, not the database.

Cheers - Miles


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.10.5/406 - Release Date: 8/2/2006



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to