Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Views filtered by taxonomy term and ordered by e.g. node.created value can produce slow queries on the term_node table (e.g., in MySQL, using explain on such a view's query shows "using temporary" and "using filesort" on the term_node table).

Term node sort provides a Views sort handler allowing sorting of node lists using the term_node.vid field (which joins on node.vid, the version or revision ID of the node). Sorting on term_node.vid rather than node.created allows much more efficient queries, avoiding temporary table and filesort issues.

Drupal 6 only.

However, the node.vid value is not a perfect substitute for node.created. This sort handler should be used only in one of the following situations:

  • Desired sort order is by node.created and:
    • Node revisions are not used on the content types in the view, meaning that node.nid and node.vid produce the same ordering.
    • There is no desire to customize ordering by manually editing node.created values.
  • Desired sort order is by node.updated and:
    • Node revisions are always used on the content types in the view, meaning that a new revision is created with every edit.
    • There is no desire to customize ordering by manually editing node.updated values.

Project information