tencent cloud

TencentDB for MySQL

動向とお知らせ
製品アップデート情報一覧
初心者ガイド
製品紹介
製品概要
製品の優位性
適用シナリオ
データベースのアーキテクチャ
タグ編集
製品機能リスト
データベースインスタンス
高可用性(マルチアベイラビリティゾーン)
地域とAvailability Zone
自社研究カーネル
TXSQLカーネル概要
機能系特性
パフォーマンス系特性
セキュリティ系特性
安定性系特性
TXRocksエンジン
購入ガイド
課金概要
購入方法
支払い更新の説明
支払い延滞の説明
返金説明
インスタンス調整の料金の説明
バックアップキャパシティ課金説明
クイックスタート
概要
MySQLインスタンスの作成
操作ガイド
使用制限
操作一覧
インスタンスの管理とメンテナンス
アップグレードインスタンス
拡張インスタンス
データベースプロキシ
データベース管理(DMC)
アカウント管理
パラメータ設定
バックアップとロールバック
データ移行
インターネットとセキュリティ
監視とアラーム
ログセンター
タグ
プラクティスチュートリアル
MySQL利用規約
アプリケーションの自動再接続機能のコンフィグレーション
MySQLマスターインスタンスパラメータの変更影響
MyISAMからInnoDBエンジンへの切り替え制限
TencentDB for MySQLのためのVPC作成
MySQLによるサービス負荷能力の向上
2地域3センターのディザスタリカバリ構築
リード・ライト分離によるTencentDB for MySQLパフォーマンスの拡張
DTSでInnoDBデータをRocksDBに移行します
LAMPスタック上のWebアプリケーションの構築
Drupalウエブサイトの構築
Python言語によるMySQL APIの使用
ホワイトペーパー
パフォーマンス白書
セキュリティ白書
トラブルシューティング
接続に関する問題
性能関連
インスタンスデータの同期遅延
大文字と小文字を区別しない設定に失敗しました
APIドキュメント
History
Introduction
API Category
Instance APIs
Making API Requests
Data Import APIs
Database Proxy APIs
Database Audit APIs
Security APIs
Task APIs
Backup APIs
Account APIs
Rollback APIs
Parameter APIs
Database APIs
Monitoring APIs
Log-related API
Data Types
Error Codes
よくある質問
課金関連
ロールバック関連の問題
接続とログインに関する問題
パラメータを変更
アップグレード関連の問題
アカウント権限
性能メモリ
運営する
データ移行
機能特徴
コンソール関連
ログ関連
API 2.0切り替え 3.0ガイド
Service Agreement
Service Level Agreement
Terms of Service
汎用参考
標準と認証
お問い合わせ
用語集
ドキュメントTencentDB for MySQL

Ordered Pagination Feature

フォーカスモード
フォントサイズ
最終更新日: 2025-05-09 11:51:17
In MySQL, the data on the second page may be duplicated with the data on the first page if an order by clause with duplicate field values is used together with a limit clause for pagination queries. This is because MySQL uses heapsort, which is an unstable sorting method. When duplicate values exist, the output result changes each time. Therefore, when an order by...limit... statement is used, it is suggested that indexes are set for fields in the order by clause or other fields are added to the order by clause to maintain data uniqueness.
To solve this problem, the read-only analysis engine provides the ordered pagination feature. By using this feature, you do not need to worry about the database logic, and no duplicate data exists in the result output by order by...limit..., ensuring the sequence consistency.

Implementation Principles

In SQL execution scenarios involving sorting and pagination, the read-only analysis engine performs implicit sorting on the full data by default after it determines the business sorting logic. This avoids the problem of data duplication caused by limit operations.

Ordered Pagination Scenarios

Only the limit operator is used, and no order by operator is used.
Duplicate order by keys exist, and only some fields in the output result are sorted.
The subquery involves sorting, but sorting is not performed in the outer query.

Impact on Performance

If the ordered pagination feature is enabled, additional sorting operations will be performed. Therefore, some queries may experience performance degradation. Please choose whether to use the ordered pagination feature according to the actual business situation.

Usage Instructions

For details on enabling and using the ordered pagination feature, see Paging Order Preservation Feature.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック