Efficient queries

From Green software

Revision as of 11:42, 5 December 2015 by Gpi600 (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Most Web applications of any size involve the use of a database. Typically, a Web application allows the addition or creation of new records (for example, when a new user registers on the site), and the reading and searching of many records in a database. The most common bottleneck when developing a Web application is in the reading of a large number of records from a database, or executing a particularly complex SELECT statement against the database. Source:

Contents

Advantages

Besides energy efficiency often usability is also improved and even servers can be consolidated after queries have been improved.

Disadvantages

The way to optimize a database is very specific for each database and task. Optimizing database queries is a task often requiring specialists for the specific database technique.

Implementations

Some basic techniques to optimize database querying:

  • Eliminating any unnecessary ORDER BY clauses
  • Watching for complex SELECTs
  • Use indexes

Denormalisation

Theoretically databases are best when they adhere to a high degree of normal form and hold no redundant information. In practice introducing data redundancy and denormalisation can sometimes help support more efficient queries.

Evaluation

In Energy efficient software, this practice was empirically evaluated on the MySQL Database Server. The application of the practice caused a 25% decrease in energy consumption.

See Also

[http//www.stevengould.org/portfolio/developerWorks/efficientPHP/wa-effphp/wa-effphp-4-1.html]

Increase LINQ Query Performance: http//msdn.microsoft.com/en-us/magazine/cc721610.

Sources

This best practices was recognized as such by IT professionals, described in Energy efficient software.

Personal tools