{"id":349558,"date":"2023-06-29T15:02:28","date_gmt":"2023-06-29T15:02:28","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=349558"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=349558","title":{"rendered":"<span>\u0423\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 sql \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u0438<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438 \u00a0\u0443\u043c\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0451\u043c\u0430\u0445 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 offset \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043b\u043e\u0445\u043e\u0433\u043e, \u043d\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0441\u0442\u0451\u0442 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u00ab\u0442\u043e\u0440\u043c\u043e\u0437\u0438\u0442\u044c\u00bb. \u0421\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0440\u043e\u0441\u0442\u0435 \u043e\u0431\u044a\u0451\u043c\u043e\u0432 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0434\u0437\u044e\u0434\u043e \u00ab\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e &#8212; \u0442\u043e\u043b\u043a\u043d\u0438, \u043d\u0430\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e &#8212; \u0442\u044f\u043d\u0438\u00bb, \u00a0\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0435\u0449\u0451 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043e\u0431\u044a\u0451\u043c, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0443\u0442\u0451\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e \u043d\u0435\u043c\u0443.<\/p>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u0451\u043c \u043d\u0435 \u043d\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/medium.com\/swlh\/sql-pagination-you-are-probably-doing-it-wrong-d0f2719cc166\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/medium.com\/swlh\/sql-pagination-you-are-probably-doing-it-wrong-d0f2719cc166<\/u><\/a>. \u041d\u043e, \u043d\u0430 \u043c\u043e\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0437\u0430\u0441\u043b\u0443\u0436\u0435\u043d\u043d\u043e \u0440\u0435\u0434\u043a\u043e.<\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0446\u0435\u043b\u044c \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0451\u043c\u0443 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0435\u0433\u043e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c\u00a0offset.<\/p>\n<p>\u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043a \u0411\u0414 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 offset \u0438 \u043f\u043e\u043a\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 100 000 \u0441\u0442\u0440\u043e\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u043e, \u043d\u043e \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u044a\u0451\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 1001, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<p>\u0417\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/614\/2e0\/b26\/6142e0b26e1ef703ec0d1cad3597db61.png\" width=\"355\" height=\"24\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/614\/2e0\/b26\/6142e0b26e1ef703ec0d1cad3597db61.png\"\/><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0d0\/8b0\/90b\/0d08b090ba8fdda31b71ead851eabb61.png\" width=\"335\" height=\"57\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0d0\/8b0\/90b\/0d08b090ba8fdda31b71ead851eabb61.png\"\/><\/figure>\n<p>\u0425\u043e\u0442\u044f \u0440\u0430\u043d\u0435\u0435 \u0434\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430, \u043d\u043e \u0432\u0438\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fa2\/046\/578\/fa20465783dfd560f4c6d962dbe2820b.png\" width=\"319\" height=\"44\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fa2\/046\/578\/fa20465783dfd560f4c6d962dbe2820b.png\"\/><\/figure>\n<p>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c offset \u00a0\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0438 \u043d\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0430 \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0451\u043c \u0437\u0430\u043c\u0435\u0440\u044b \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0438 \u043d\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 (\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e):<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441 \u043a \u043d\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/strong><\/p>\n<p>sql: &#8216;<code>select table_name.* from table_name group by ID limit ? offset ?<\/code>&#8216;<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">Limit offset<\/p>\n<\/td>\n<td>\n<p align=\"left\">Duration<\/p>\n<\/td>\n<td>\n<p align=\"left\">Bytes<\/p>\n<\/td>\n<td>\n<p align=\"left\">Deceleration<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">limit 10 offset 0<\/p>\n<\/td>\n<td>\n<p align=\"left\">179ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">limit 10 offset 1000<\/p>\n<\/td>\n<td>\n<p align=\"left\">191ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.06<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">limit 10 offset 100 000<\/p>\n<\/td>\n<td>\n<p align=\"left\">606ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.38<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">limit 10 offset 200 000<\/p>\n<\/td>\n<td>\n<p align=\"left\">790ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">4.41<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">limit 10 offset 300 000<\/p>\n<\/td>\n<td>\n<p align=\"left\">864ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">4.82<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">limit 10 offset 400 000<\/p>\n<\/td>\n<td>\n<p align=\"left\">1115ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">1320 <\/p>\n<\/td>\n<td>\n<p align=\"left\">6.22<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0448\u0435\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 offset \u043e\u0442 0 \u0434\u043e 400 000, \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432 6 \u0440\u0430\u0437. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 offset\u00a0\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u043b \u0432\u0441\u0435 400 000 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0430 \u0443\u0436\u0435 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u0438\u0445 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c. \u0422\u0430\u043a \u0436\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0442\u043e\u0438\u0442 \u0443\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446. \u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 3000ms \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441 400 000 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u0414\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a \u043e\u0431\u0449\u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e Duration, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u043e\u0436\u0434\u044b \u0434\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c. <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430: &#8216;<code>select count(*) from table_name<\/code>&#8216;.<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/strong><\/p>\n<p>sql: &#8216;<code>select table_name.* from table_name where (table_name.sortID > ?) group by sortID order by sortID asc limit ?<\/code>&#8216;<\/p>\n<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 offset \u00a0\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u00a0\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 sortID \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c sortID 0 \u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 sortID \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">SortID limit <\/p>\n<\/td>\n<td>\n<p align=\"left\">Duration<\/p>\n<\/td>\n<td>\n<p align=\"left\">Bytes<\/p>\n<\/td>\n<td>\n<p align=\"left\">Deceleration<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sortID 0\u00a0limit 10<\/p>\n<\/td>\n<td>\n<p align=\"left\">183ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sortID 1000\u00a0limit 10<\/p>\n<\/td>\n<td>\n<p align=\"left\">189ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">1,032<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sortID 100000\u00a0limit 10<\/p>\n<\/td>\n<td>\n<p align=\"left\">190ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">1,038<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sortID 200000\u00a0limit 10<\/p>\n<\/td>\n<td>\n<p align=\"left\">192ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">1,049<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sortID 300000\u00a0limit 10<\/p>\n<\/td>\n<td>\n<p align=\"left\">179ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,978<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sortID 400000\u00a0limit 10<\/p>\n<\/td>\n<td>\n<p align=\"left\">180ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,983<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0448\u0435\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 sortID \u043e\u0442 0 \u0434\u043e 400 000, \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c \u0447\u0442\u043e \u0411\u0414 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e 10 \u0437\u0430\u043f\u0438\u0441\u0435\u0439.<\/p>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435:<\/strong><\/p>\n<p>\u041e\u0441\u044c X &#8212; \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 offset\/sortID.<\/p>\n<p>\u041e\u0441\u044c Y &#8212; \u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. <\/p>\n<p>\u041d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u043d\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u043f\u0440\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 offset\/sortID\u00a0> 1000 \u0440\u0435\u0437\u043a\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0442\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/526\/154\/356\/526154356c726ded74cf74018c6df39e.png\" width=\"535\" height=\"401\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/526\/154\/356\/526154356c726ded74cf74018c6df39e.png\"\/><\/figure>\n<p><strong>\u041a\u0430\u043a \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0411\u0414.<\/strong><\/p>\n<ol>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u043f\u043e\u043b\u0435. \u0421\u043e\u0437\u0434\u0430\u0451\u043c\u00a0\u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e:<\/p>\n<p><code>ALTER TABLE table_name<\/code><\/p>\n<p><code>ADD COLUMN sortID bigint(15) UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE <\/code><\/p>\n<p><code>FIRST;<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u044b:<\/p>\n<p>\u0411\u044b\u043b\u043e: &#8216;<code>select table_name.* from table_name group by ID limit ? offset ?<\/code>&#8216; (limit =10, offset=100 000)<br \/> \u0421\u0442\u0430\u043b\u043e:  &#8216;<code>select table_name.* from table_name where (table_name.sortID > ?) group by sortID order by sortID asc limit ?<\/code>&#8216; (sortID =100 000, limit =10).<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0418\u0442\u043e\u0433<\/strong>: \u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0440\u0430\u0437\u044b\u00a0\u043f\u0440\u0438 \u043e\u0431\u044a\u0451\u043c\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0438 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0431\u0443\u0434\u0443\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438.\u00a0\u041d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0437\u0430 \u0434\u0430\u043d\u043d\u0443\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u044b \u043f\u043b\u0430\u0442\u0438\u043c \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0443), \u043d\u043e \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u044d\u0442\u0430 \u043f\u043b\u0430\u0442\u0430 \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430. \u041f\u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043d\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 offset.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/744814\/\"> https:\/\/habr.com\/ru\/articles\/744814\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438 \u00a0\u0443\u043c\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0451\u043c\u0430\u0445 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 offset \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043b\u043e\u0445\u043e\u0433\u043e, \u043d\u043e \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0441\u0442\u0451\u0442 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u00ab\u0442\u043e\u0440\u043c\u043e\u0437\u0438\u0442\u044c\u00bb. \u0421\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u0432 \u0440\u043e\u0441\u0442\u0435 \u043e\u0431\u044a\u0451\u043c\u043e\u0432 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0434\u0437\u044e\u0434\u043e \u00ab\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e &#8212; \u0442\u043e\u043b\u043a\u043d\u0438, \u043d\u0430\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e &#8212; \u0442\u044f\u043d\u0438\u00bb, \u00a0\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0435\u0449\u0451 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043e\u0431\u044a\u0451\u043c, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0443\u0442\u0451\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e \u043d\u0435\u043c\u0443.<\/p>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u0451\u043c \u043d\u0435 \u043d\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/medium.com\/swlh\/sql-pagination-you-are-probably-doing-it-wrong-d0f2719cc166\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/medium.com\/swlh\/sql-pagination-you-are-probably-doing-it-wrong-d0f2719cc166<\/u><\/a>. \u041d\u043e, \u043d\u0430 \u043c\u043e\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u0437\u0430\u0441\u043b\u0443\u0436\u0435\u043d\u043d\u043e \u0440\u0435\u0434\u043a\u043e.<\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0446\u0435\u043b\u044c \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0451\u043c\u0443 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0435\u0433\u043e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c\u00a0offset.<\/p>\n<p>\u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043a \u0411\u0414 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 offset \u0438 \u043f\u043e\u043a\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 100 000 \u0441\u0442\u0440\u043e\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u043e, \u043d\u043e \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u044a\u0451\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 1001, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u0432\u0435\u0442\u0430.<\/p>\n<p>\u0417\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<figure class=\"\"><\/figure>\n<figure class=\"\"><\/figure>\n<p>\u0425\u043e\u0442\u044f \u0440\u0430\u043d\u0435\u0435 \u0434\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0430, \u043d\u043e \u0432\u0438\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c offset \u00a0\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u0438 \u043d\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0430 \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<p>\u041f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0451\u043c \u0437\u0430\u043c\u0435\u0440\u044b \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0438 \u043d\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 (\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e):<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441 \u043a \u043d\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/strong><\/p>\n<p>sql: &#8216;<code>select table_name.* from table_name group by ID limit ? offset ?<\/code>&#8216;<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">Limit offset<\/p>\n<\/td>\n<td>\n<p align=\"left\">Duration<\/p>\n<\/td>\n<td>\n<p align=\"left\">Bytes<\/p>\n<\/td>\n<td>\n<p align=\"left\">Deceleration<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">limit 10 offset 0<\/p>\n<\/td>\n<td>\n<p align=\"left\">179ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">limit 10 offset 1000<\/p>\n<\/td>\n<td>\n<p align=\"left\">191ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">1.06<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">limit 10 offset 100 000<\/p>\n<\/td>\n<td>\n<p align=\"left\">606ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">3.38<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">limit 10 offset 200 000<\/p>\n<\/td>\n<td>\n<p align=\"left\">790ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">4.41<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">limit 10 offset 300 000<\/p>\n<\/td>\n<td>\n<p align=\"left\">864ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">4.82<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">limit 10 offset 400 000<\/p>\n<\/td>\n<td>\n<p align=\"left\">1115ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">1320 <\/p>\n<\/td>\n<td>\n<p align=\"left\">6.22<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0448\u0435\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 offset \u043e\u0442 0 \u0434\u043e 400 000, \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432 6 \u0440\u0430\u0437. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 offset\u00a0\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u043b \u0432\u0441\u0435 400 000 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0430 \u0443\u0436\u0435 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u0438\u0445 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c. \u0422\u0430\u043a \u0436\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0442\u043e\u0438\u0442 \u0443\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0447\u0438\u0441\u043b\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446. \u0414\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043a\u043e\u043b\u043e 3000ms \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441 400 000 \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u0414\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a \u043e\u0431\u0449\u0435\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e Duration, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u043e\u0436\u0434\u044b \u0434\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c. <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430: &#8216;<code>select count(*) from table_name<\/code>&#8216;.<\/p>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441 \u043a \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435:<\/strong><\/p>\n<p>sql: &#8216;<code>select table_name.* from table_name where (table_name.sortID > ?) group by sortID order by sortID asc limit ?<\/code>&#8216;<\/p>\n<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 offset \u00a0\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u00a0\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 sortID \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c sortID 0 \u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 sortID \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">SortID limit <\/p>\n<\/td>\n<td>\n<p align=\"left\">Duration<\/p>\n<\/td>\n<td>\n<p align=\"left\">Bytes<\/p>\n<\/td>\n<td>\n<p align=\"left\">Deceleration<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sortID 0\u00a0limit 10<\/p>\n<\/td>\n<td>\n<p align=\"left\">183ms<\/p>\n<\/td>\n<td>\n<p align=\"left\">1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sortID 1000\u00a0limit 10<\/p>\n<\/td>\n<td>\n<p align=\"left\">189ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">1,032<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sortID 100000\u00a0limit 10<\/p>\n<\/td>\n<td>\n<p align=\"left\">190ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">1,038<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sortID 200000\u00a0limit 10<\/p>\n<\/td>\n<td>\n<p align=\"left\">192ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">1,049<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sortID 300000\u00a0limit 10<\/p>\n<\/td>\n<td>\n<p align=\"left\">179ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,978<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">sortID 400000\u00a0limit 10<\/p>\n<\/td>\n<td>\n<p align=\"left\">180ms<\/p>\n<\/td>\n<td>\n<p>1320<\/p>\n<\/td>\n<td>\n<p align=\"left\">0,983<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c \u0448\u0435\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 sortID \u043e\u0442 0 \u0434\u043e 400 000, \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c \u0447\u0442\u043e \u0411\u0414 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e 10 \u0437\u0430\u043f\u0438\u0441\u0435\u0439.<\/p>\n<p><strong>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435:<\/strong><\/p>\n<p>\u041e\u0441\u044c X &#8212; \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 offset\/sortID.<\/p>\n<p>\u041e\u0441\u044c Y &#8212; \u0412\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445. <\/p>\n<p>\u041d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u043d\u0435 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u043f\u0440\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 offset\/sortID\u00a0> 1000 \u0440\u0435\u0437\u043a\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e \u043f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0442\u0438.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p><strong>\u041a\u0430\u043a \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0411\u0414.<\/strong><\/p>\n<ol>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u043f\u043e\u043b\u0435. \u0421\u043e\u0437\u0434\u0430\u0451\u043c\u00a0\u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e:<\/p>\n<p><code>ALTER TABLE table_name<\/code><\/p>\n<p><code>ADD COLUMN sortID bigint(15) UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE <\/code><\/p>\n<p><code>FIRST;<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u044b:<\/p>\n<p>\u0411\u044b\u043b\u043e: &#8216;<code>select table_name.* from table_name group by ID limit ? offset ?<\/code>&#8216; (limit =10, offset=100 000)<br \/> \u0421\u0442\u0430\u043b\u043e:  &#8216;<code>select table_name.* from table_name where (table_name.sortID > ?) group by sortID order by sortID asc limit ?<\/code>&#8216; (sortID =100 000, limit =10).<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0418\u0442\u043e\u0433<\/strong>: \u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0440\u0430\u0437\u044b\u00a0\u043f\u0440\u0438 \u043e\u0431\u044a\u0451\u043c\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0438 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0431\u0443\u0434\u0443\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438.\u00a0\u041d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0437\u0430 \u0434\u0430\u043d\u043d\u0443\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u044b \u043f\u043b\u0430\u0442\u0438\u043c \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0443), \u043d\u043e \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u044d\u0442\u0430 \u043f\u043b\u0430\u0442\u0430 \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430. \u041f\u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043d\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 offset.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/744814\/\"> https:\/\/habr.com\/ru\/articles\/744814\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-349558","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/349558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=349558"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/349558\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=349558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=349558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=349558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}