1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Implemented Add index to xf_node to support very large number of nodes

Discussion in 'Closed Suggestions' started by Mike Tougeron, Oct 20, 2011.

  1. Mike Tougeron

    Mike Tougeron Well-Known Member

    When there are is a large number of nodes (10,000s) but only a subset to be displayed the select query to get the list of nodes for the home page can be slow because it doesn't have an index on the 'display_in_list' field. I added this index
    ALTER TABLE xf_node ADD INDEX `display_in_list` (`display_in_list`, `lft`);
    and it greatly improved performance.
    Jay, GeeksChat, digitalpoint and 2 others like this.
  2. Kier

    Kier XenForo Developer Staff Member

    Seems reasonable. I've added it to the upgrade script for the next version.
    Jay and digitalpoint like this.
  3. Mike Tougeron

    Mike Tougeron Well-Known Member

Share This Page