|
Software
Proper database design is the single most important factor for the ensuring performance and maintainability of the database. Here is what you need to answer when designing a table:Use unsigned numeric values when the application will not store negative numbers. Like the “quantity ordered” of an item in an ecommerce application is never going to be -$125.
Use Variable length values instead of fixed length value i.e. used varchar instead of char.
Do not use unnecessarily large field sizes. For most ecommerce application “unsigned smallint” is more than enough to store inventory count. A field described as “unsigned smallint” can store a max value of 65535.
Don’t ignore normalization; its helps prevent unnecessary repetition of data. The part B of this is, don’t overuse normalization. If the table will not grow in size significantly, there is no point in normalization. For example, if the user table has just 20 rows (i.e. 20 employees in a company), all attempts of normalization are wasted.
Use Keys. Don’t decide keys by “The customer id has to be indexed in the order table”. If the order table is being searched 90% of the times by “order date”, it makes more sense to index “order date”.
Business - All business/finance/loan/mortgage related link can be found here
more 1 2 3 4 5
Computers - All computer hardware/software/peripheral related link can be found here
more 1 2 3 4 5
Internet - All webhosting/webdesign/internet marketing related link can be found here
more 1 2 3 4 5
Software - All software related link can be found here
more 1 2 3 4 5
Web Design - All web design/development related link can be found here
more 1 2 3 4 5
Web Hosting - All web hosting related link can be found here
more 1 2 3 4 5
Web Promotion - All search engine optimization/internet marketing related link can be found here
more 1 2 3 4 5
Web Resources - All other web related link can be found here
more 1 2 3 4 5
Recreation - All travel/hotel/cruise related link can be found here
more 1 2 3 4 5
Casino - All online gambling/poker/blackjack/roulette related link can be found here
more 1 2 3 4 5
Health - All online pharmacy/hospital/health related link can be found here
more 1 2 3 4 5
Shopping - All online shopping/gift related link can be found here
more 1 2 3 4 5
Miscellaneous - All other links can be found here
more 1 2 3 4 5
Bad Queries
It sounds too good to be true but you wont believe the number of developers out there who completely suck at writing queries. There are two types of bad queries:
Unnecessary Queries: These are the queries that shouldn’t have been made in the first place. The only way to avoid this is asking, “Do I really need this data?”
Inefficient Queries: These are the queries that do not use the underlying table structure or MySQL functions in the correct way.
Here is a starting point to start looking at problem areas:
Unnecessary usage of “Select * “statements when the entire processing is being done on a single column. The more data is fetched from the server the more work MySQL has to do and more bandwidth it takes.
Using sub-query instead of a join. On a properly designed database, joins are incredibly fast. Using sub-queries just shows a lack of knowledge.
|