MySQL Forums
Forum List  »  InnoDB

Re: Full Table Scans When LIMIT / OFFSET Are Used
Posted by: Carlos Mennens
Date: September 22, 2021 05:34PM

CREATE TABLE `tbl` (
  `id` bigint(21) unsigned NOT NULL AUTO_INCREMENT,
  `t_p_r_key` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `t_p_type` int(11) NOT NULL,
  `r_key` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
  `t_p_key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `active` bit(1) NOT NULL DEFAULT b'1',
  `version` int(11) NOT NULL DEFAULT '1',
  `created_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `updated_at` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `dipped_at` datetime(6) DEFAULT NULL,
  `session_key` char(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `third_party_reference_key_version` (`t_p_r_key`,`version`),
  KEY `third_party_reference_key` (`t_p_r_key`,`dipped_at`),
  KEY `reference_key` (`r_key`,`dipped_at`),
  KEY `third_party_key` (`t_p_key`,`dipped_at`)
) ENGINE=InnoDB AUTO_INCREMENT=623787 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Full Table Scans When LIMIT / OFFSET Are Used
652
September 22, 2021 05:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.