Make WordPress Core


Ignore:
Timestamp:
09/07/2025 08:33:43 PM (11 months ago)
Author:
SergeyBiryukov
Message:

Database: Add type_status_author index for the posts table.

This aims to improve performance of some queries on installations with a large number of posts.

Follow-up to [3678], [3690], [9290], [13576].

Props josephscott, LucasMS, Otto42, flixos90, matt, johnjamesjacoby, siliconforks, mukesh27, jonsurrell, SirLouen, SergeyBiryukov.
Fixes #50161.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/schema.php

    r60614 r60717  
    185185        KEY type_status_date (post_type,post_status,post_date,ID),
    186186        KEY post_parent (post_parent),
    187         KEY post_author (post_author)
     187        KEY post_author (post_author),
     188        KEY type_status_author (post_type,post_status,post_author)
    188189) $charset_collate;\n";
    189190
Note: See TracChangeset for help on using the changeset viewer.