So far I am quite comfortable working with C# windows application. I am about to shift to Asp.net to develop a website. The requirement has made me to put around 50 columns in a single table. I know this concept of breaking it into small tables using normal forms.
I tried googling, but dint get much results. I need to know if my table with 50 attributes would decrease performance of my web application? Can somebody suggest me about this.
Does the number of columns on a table have impact on performance? Yes, more number of columns, more metadata is needed. We suggest to use least number of columns needed, ideally < 100 columns on a table if possible.
The number of tables doesn't matter so much as: What queries you're running - you aren't likely to be querying all 200 within a single query. The overall query load on the system at any given point in time.
Use temp tables Speed up query execution in your SQL server by taking any data needed out of the large table, transferring it to a temp table and join with that. This reduces the power required in processing.
There is no precise guidance. A table could be as little as one column or as many as the max, 1024. However, in general, you'll probably see no more than 10-15 columns in a table in a well normalized database.
Well, if you bring them all back you certainly have the network costs (data transfer between the db and your .NET code) and materialization costs (creating the object / DataTable
representation in your DAL), so then you would definitely have some costs. Either way you have to consider the page size of the database.
But perhaps the key thing is: do you need all the data? If so, there is only so much you can do. Using multiple tables and introducing joins will also impact performance.
In most cases though, and especially ASP.NET, the most important figures are things like:
since bandwidth and latency between your app-server and the client tends to be the pinch-point. Measure things; make sure you are targetting the right performance concerns.
Also, ASP.NET has a reputation for not being shy about storing more than you expect in things like view-state; keep an eye on this, or switch to a more light-weight model like ASP.NET MVC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With