Reputation: 679
I am creating a web app that has a big load of data for its items. I was wondering if separating the data into 2 tables (ItemData & ItemDataDetails) would decrease the execution time of the queries. My drive is that I have 2 pages, 1 page which displays the most basic info regarding the item and another that shows the details. By logic I think that it should decrease the load time for the page where the basic info is showed. Am I correct or not?
Upvotes: 0
Views: 56
Reputation: 20330
You are almost certainly correct in this case given you are talking say show some "header" / summary data for 1 item on one page and then all details for that one item on another. Especially if the user isn't definitely going to want to view the detail. Be wary of this idea, with a list, or when you want to display summary and detail on one page.
Upvotes: 1
Reputation: 3088
You are correct in that retrieving less data will generally be faster than retrieving more. That said, the process of separating / isolating data (into different tables based on the relationship between items of data) as a means of reducing redundancy & dependency to which you refer is known as database normalization and is a well accepted and documented best practice.
http://en.wikipedia.org/wiki/Database_normalization
Upvotes: 1