CREATE TABLE `wp_posts` (
    `ID` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
    `post_author` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
    `post_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    `post_date_gmt` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    `post_content` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
    `post_title` TEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
    `post_excerpt` TEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
    `post_status` VARCHAR(20) NOT NULL DEFAULT 'publish' COLLATE 'utf8mb4_unicode_ci',
    `comment_status` VARCHAR(20) NOT NULL DEFAULT 'open' COLLATE 'utf8mb4_unicode_ci',
    `ping_status` VARCHAR(20) NOT NULL DEFAULT 'open' COLLATE 'utf8mb4_unicode_ci',
    `post_password` VARCHAR(20) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
    `post_name` VARCHAR(200) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
    `to_ping` TEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
    `pinged` TEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
    `post_modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    `post_modified_gmt` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    `post_content_filtered` LONGTEXT NOT NULL COLLATE 'utf8mb4_unicode_ci',
    `post_parent` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
    `guid` VARCHAR(255) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
    `menu_order` INT(11) NOT NULL DEFAULT '0',
    `post_type` VARCHAR(20) NOT NULL DEFAULT 'post' COLLATE 'utf8mb4_unicode_ci',
    `post_mime_type` VARCHAR(100) NOT NULL DEFAULT '' COLLATE 'utf8mb4_unicode_ci',
    `comment_count` BIGINT(20) NOT NULL DEFAULT '0',
    PRIMARY KEY (`ID`),
    INDEX `type_status_date` (`post_type`, `post_status`, `post_date`, `ID`),
    INDEX `type_modified_status` (`post_type`, `post_modified_gmt`, `post_status`),
    INDEX `post_parent` (`post_parent`),
    INDEX `post_author` (`post_author`),
    INDEX `post_name` (`post_name`(191))
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=MyISAM
AUTO_INCREMENT=19833;
insert into wp_posts(post_type, post_status, post_modified_gmt, post_content_filtered, post_content, post_title, post_excerpt, to_ping, pinged) values
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', ''),
('test', 'publish', now(), '', '', '', '', '', '');

explain SELECT post_modified_gmt FROM (
    SELECT @rownum:=@rownum+1 rownum, wp_posts.post_modified_gmt 
    FROM (SELECT @rownum:=0) r, wp_posts
        WHERE post_status IN ('publish','inherit')
        AND post_type = 'test'
        ORDER BY post_modified_gmt ASC
    ) x 
WHERE rownum %1000 = 0;

-- compare
explain SELECT post_modified_gmt FROM (
    SELECT @rownum:=@rownum+1 rownum, wp_posts.post_modified_gmt 
    FROM (SELECT @rownum:=0) r, wp_posts force index(type_modified_status)
        WHERE post_status IN ('publish','inherit')
        AND post_type = 'test'
        ORDER BY post_modified_gmt ASC
    ) x 
WHERE rownum %1000 = 0;
