Monday, November 30, 2009

Web 2.0 web applications

The term "Web 2.0" is commonly associated with web applications that facilitate interactive information sharing, interoperability, user-centered design and collaboration on the World Wide Web.

Examples of Web 2.0 include web-based communities, hosted services, web applications, social-networking sites, video-sharing sites, wikis, blogs, mashups and folksonomies. A Web 2.0 site allows its users to interact with other users or to change website content, in contrast to non-interactive websites where users are limited to the passive viewing of information that is provided to them.

The term is closely associated with Tim O'Reilly because of the O'Reilly Media Web 2.0 conference in 2004. Although the term suggests a new version of the World Wide Web, it does not refer to an update to any technical specifications, but rather to cumulative changes in the ways software developers and end-users use the Web.

Web 2.0 websites typically include some of the following features and techniques. Andrew McAfee used the acronym SLATES to refer to them:

Search

Finding information through keyword search.

Links

Connects information together into a meaningful information ecosystem using the model of the Web, and provides low-barrier social tools.

Authoring

The ability to create and update content leads to the collaborative work of many rather than just a few web authors. In wikis, users may extend, undo and redo each other's work. In blogs, posts and the comments of individuals build up over time.

Tags

Categorization of content by users adding one-word descriptions to facilitate searching, without dependence on pre-made categories. This is referred to as "folksonomy."

Extensions

Software that makes the Web an application platform as well as a document server.

Signals

The use of syndication technology such as RSS to notify users of content changes.

Thursday, March 19, 2009

Optimizing MySQL Database Queries with explain command

When you analyse a SELECT statement with the command EXPLAIN, MySQL shows information from the optimizer about the query execution plan. That is MySQL explains how the MySQL engine would execute the SELECT quesry.It will show the details about how the tables are joined and which will be the order of joining. EXPLAIN estimates of the number of rows that will need to be examined from each table.

Using the EXPLAIN command , you can decide where you should add indexes to tables to get a faster SELECT results that uses indexes to find rows in the table. We can use EXPLAIN command to check whether the optimizer joins the tables in an optimal order.

If you have a problem with indexes not being used when you believe that they should be, you should run ANALYZE TABLE to update table statistics such as cardinality of keys, which can affect the choices the optimizer makes.

MySQL resolves all joins using a single-sweep multi-join method. MySQL reads a row from the first table, and then finds a matching row in the second table, the third table, and so on. When all tables are processed, MySQL outputs the selected columns and backtracks through the table list until a table is found for which there are more matching rows.

The MySQL query optimizer has several goals, but its primary aims are to use indexes whenever possible and to use the most restrictive index in order to eliminate as many rows as possible as soon as possible.