{"id":474723,"date":"2025-09-11T21:01:23","date_gmt":"2025-09-11T21:01:23","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=474723"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=474723","title":{"rendered":"<span>UUIDv7 \u0432 PostgreSQL 18<\/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>\u0421\u043e\u0432\u0441\u0435\u043c \u0441\u043a\u043e\u0440\u043e (\u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f) \u0432\u044b\u0439\u0434\u0435\u0442 PostgreSQL 18. \u0420\u0435\u043b\u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u0438\u0442 \u0432\u0430\u0436\u043d\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u2014 \u043e\u0442 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e I\/O \u0434\u043e EXPLAIN \u0441 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438 CPU \u0438 WAL.\u00a0<\/p>\n<p>\u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u0440\u043e\u043c\u043a\u0430\u044f \u043d\u043e\u0432\u0438\u043d\u043a\u0430 \u2014 \u043d\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 UUIDv7, \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432, \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u043b\u044f B-tree \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432.\u00a0<\/p>\n<p>\u0412 \u043d\u043e\u0432\u043e\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <a href=\"https:\/\/t.me\/+QmrKn0wA8CdkNjAy\" rel=\"noopener noreferrer nofollow\">Spring \u0410\u0439\u041e<\/a> \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 UUIDv7 \u0438 \u0447\u0435\u043c \u043e\u043d \u043b\u0443\u0447\u0448\u0435 UUIDv4 \u0434\u043b\u044f \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n<hr\/>\n<h2>UUIDv7 \u0432 PostgreSQL 18<\/h2>\n<p>PostgreSQL 18 \u0443\u0436\u0435 \u043d\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u2014 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0431\u0435\u0442\u0430-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0421\u0440\u0435\u0434\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u0432 \u044d\u0442\u043e\u043c \u0440\u0435\u043b\u0438\u0437\u0435 \u2014 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 <code>UUIDv7<\/code>. \u042d\u0442\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442 <code>UUID<\/code> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u0435\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 B-tree \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <code>UUID<\/code>, \u0447\u0435\u043c \u043f\u043e\u043b\u0435\u0437\u0435\u043d <code>UUIDv7<\/code> \u0438 \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 PostgreSQL.<\/p>\n<h2>PostgreSQL 18<\/h2>\n<p><a href=\"https:\/\/www.postgresql.org\/about\/news\/postgresql-18-beta-1-released-3070\/\" rel=\"noopener noreferrer nofollow\">Beta-\u0432\u0435\u0440\u0441\u0438\u044f PostgreSQL 18 (beta 1) \u0432\u044b\u0448\u043b\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e<\/a>. \u0420\u0435\u043b\u0438\u0437 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447, \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439. \u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0438 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0431\u0430\u0433\u0430\u0445 \u2014 \u0446\u0435\u043b\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 \u0432 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0435.<\/p>\n<p>\u0421\u0440\u0435\u0434\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0439:<\/p>\n<ul>\n<li>\n<p>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 I\/O (\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>io_uring<\/code>) \u2014 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 (<code>seqscan<\/code>) \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 VACUUM \u0432 2\u20133 \u0440\u0430\u0437\u0430<\/p>\n<\/li>\n<li>\n<p>\u201c\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u201d \u0432 \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u0445 B-tree \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0443\u043c\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f OR\/IN. <\/p>\n<p>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0430 Spring \u0410\u0439\u041e, \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0438: <span class=\"habrahidden\">\u0420\u0435\u0447\u044c \u043f\u0440\u043e\u00a0\u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u00abskip scan\u00bb. \u042d\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u00a0\u0440\u0430\u043c\u043a\u0430\u0445 Postgres 18, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u0439 btree \u0438\u043d\u0434\u0435\u043a\u0441. \u041f\u043e\u043a\u0430 \u0443\u0441\u0442\u043e\u044f\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u0432\u00a0\u0441\u0435\u0442\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u0430 \u0434\u043b\u044f\u00a0\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u043d\u0430\u00a0\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u044f \u043f\u043e\u00a0\u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u043d\u0435\u00a0\u0437\u043d\u0430\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u0435\u0440\u0435\u0432\u0435\u043b\u0438 \u043a\u0430\u043a \u00ab\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u00bb.<\/span><\/p>\n<p><span class=\"habrahidden\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430\u00a0\u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043a\u0440\u0430\u0439\u043d\u0435 \u0432\u0430\u0436\u043d\u0430\u044f, \u043d\u043e\u00a0\u043e\u043d\u0430 \u043d\u0435\u00a0\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0446\u0435\u043b\u044c\u044e \u0441\u0442\u0430\u0442\u044c\u0438. \u041f\u043e\u0437\u0436\u0435, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0441\u044c\u0431\u044b, \u043c\u044b \u043f\u0440\u043e\u00a0\u043d\u0435\u0451 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u0432\u00a0\u0434\u0435\u0442\u0430\u043b\u044f\u0445, \u0438 \u043a\u0430\u043a\u00a0\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/span><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043f\u0440\u0438 major \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u0445<\/p>\n<\/li>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 <code>UUIDv7<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b<\/p>\n<\/li>\n<li>\n<p>\u0412\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 OAuth \u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 <code>md5<\/code><\/p>\n<\/li>\n<li>\n<p>EXPLAIN ANALYZE \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 I\/O, CPU, WAL<\/p>\n<\/li>\n<li>\n<p>\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, LIKE \u0434\u043b\u044f \u043d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (\u0440\u0435\u0447\u044c \u043f\u0440\u043e collation), casefolding<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438: 3.2 (\u043f\u0435\u0440\u0432\u0430\u044f \u0441 2003 \u0433\u043e\u0434\u0430!)<\/p>\n<\/li>\n<\/ul>\n<p>\u0425\u043e\u0442\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>uuidv7()<\/code> \u2014 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u00ab\u0433\u0440\u043e\u043c\u043a\u0430\u044f\u00bb \u0444\u0438\u0447\u0430 \u0440\u0435\u043b\u0438\u0437\u0430 (\u044d\u0442\u043e \u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u0435\u0435 \u0434\u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u043c\u0443 I\/O), \u043e\u043d\u0430, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u0430\u044f \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u0430\u044f. \u0415\u0451 \u0447\u0443\u0442\u044c \u0431\u044b\u043b\u043e \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0435\u0449\u0451 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 17, \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043d\u044b, \u0447\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 UUID \u0438 \u0437\u0430\u0447\u0435\u043c \u043e\u043d \u043d\u0443\u0436\u0435\u043d?<\/h2>\n<p><code>UUID<\/code> \u2014 \u044d\u0442\u043e 128-\u0431\u0438\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u0430\u043a \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432: \u043e\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0434\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439. \u041e\u043d\u0438 \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438 \u043c\u043e\u0433\u0443\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u0442\u044c \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u0438\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u0432 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043d\u044b\u0435 \u0442\u0438\u043f\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>SERIAL<\/code> \u0438\u043b\u0438 <code>IDENTITY<\/code>). \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 (\u0445\u043e\u0442\u044f \u0434\u0430\u0436\u0435 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438), \u043d\u043e \u043f\u0440\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445.<\/p>\n<p><code>UUID<\/code> \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445:<\/p>\n<h4>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0411\u0414<\/h4>\n<p>\u0425\u043e\u0442\u044f \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0421\u0423\u0411\u0414 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043d\u044b\u0435 (<code>identity<\/code>) \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u043e\u043d\u0438 \u0438\u043c\u0435\u044e\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<h4>\u041d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b<\/h4>\n<p>\u041f\u0440\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 <code>UUID<\/code> \u043d\u0435\u043b\u044c\u0437\u044f \u0443\u0433\u0430\u0434\u0430\u0442\u044c, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0415\u0441\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442, \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 ID, \u0438 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0432\u0430\u0448\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u0442.\u043f.<\/p>\n<h4>\u041f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 UUID \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0431\u0435\u0437 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0446\u0438\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0438 serverless \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430\u0445, \u0433\u0434\u0435 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u0438\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c <code>UUID<\/code> \u0448\u0438\u0440\u043e\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u0438 \u0442\u0440\u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <code>UUID<\/code> \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<ol>\n<li>\n<p><strong>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430:<\/strong> <code>UUID<\/code> \u043d\u0435 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u044b \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0432 \u043a\u0430\u043a\u043e\u043c-\u043b\u0438\u0431\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445:<\/strong> \u041d\u043e\u0432\u044b\u0435 <code>UUID<\/code> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0440\u0430\u0437\u0434\u0443\u0442\u0438\u044e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. <\/p>\n<p>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0430 Spring \u0410\u0439\u041e, \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0438: <span class=\"habrahidden\">\u041d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443, \u0434\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e Btree \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u043e\u043a\u043b\u0430\u0434 \u0412\u043b\u0430\u0434\u0438\u043c\u0438\u0440\u0430 \u0421\u0438\u0442\u043d\u0438\u043a\u043e\u0432\u0430: https:\/\/www.youtube.com\/watch?v=y-Wtyvme4gE<\/span><\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0437\u043c\u0435\u0440:<\/strong> <code>UUID<\/code> \u2014 \u044d\u0442\u043e 128-\u0431\u0438\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 INT (32-\u0431\u0438\u0442) \u0438\u043b\u0438 BIGINT (64-\u0431\u0438\u0442) \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439. \u0414\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0449\u0443\u0442\u0438\u043c\u044b\u043c \u043e\u0432\u0435\u0440\u0445\u0435\u0434\u043e\u043c.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a <code>UUIDv7<\/code> \u0440\u0435\u0448\u0430\u0435\u0442 \u0434\u0432\u0435 \u0438\u0437 \u0442\u0440\u0451\u0445 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c.<\/p>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440 <code>UUID<\/code> \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043f\u0440\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u043c \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043b\u0438 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u0443\u043c\u0435\u044e\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c 128-\u0431\u0438\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430 \u043e\u0434\u043d\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, CMEQ \u2014 \u0447\u0430\u0441\u0442\u044c SIMD-\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 <code>UUID<\/code> \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <code>UUID<\/code> (\u0442\u0438\u043f <code>UUID<\/code>) \u043a\u0430\u043a \u0432 \u0431\u0430\u0437\u0435, \u0442\u0430\u043a \u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0430 \u043d\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435.<\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d UUIDv7?<\/h2>\n<p><code>UUID<\/code> \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0431\u044b\u043b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0432 <a href=\"https:\/\/tools.ietf.org\/html\/rfc4122\" rel=\"noopener noreferrer nofollow\">RFC 4122<\/a> \u0432 2005 \u0433\u043e\u0434\u0443. \u042d\u0442\u043e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u043f\u044f\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432\/\u0432\u0435\u0440\u0441\u0438\u0439 <code>UUID<\/code>, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b 1 \u0438 4. \u041f\u043e\u0437\u0436\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u2014 \u0432 \u043c\u0430\u0435 2024 \u0433\u043e\u0434\u0430 \u0431\u044b\u043b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d <a href=\"https:\/\/tools.ietf.org\/html\/rfc9562\" rel=\"noopener noreferrer nofollow\">RFC 9562<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432\u0435\u0440\u0441\u0438\u0438 6\u20138 (\u0445\u043e\u0442\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0430\u044f \u0447\u0435\u0440\u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0435\u0449\u0451 \u0432 2020 \u0433\u043e\u0434\u0443). \u0421 \u0434\u043d\u0451\u043c \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f, RFC 9562 \u0438 <code>UUIDv7<\/code>!<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, RFC 9562 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f UUID \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<p>\u00ab\u041e\u0434\u043d\u0430 \u0438\u0437 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439, \u0433\u0434\u0435 <code>UUID<\/code> \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0448\u0438\u0440\u043e\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435, \u2014 \u044d\u0442\u043e \u043a\u043b\u044e\u0447\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 &#8230; \u043d\u043e \u0432\u0435\u0440\u0441\u0438\u0438 <code>UUID<\/code> 1\u20135, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0432 [RFC4122], \u043b\u0438\u0448\u0435\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>\u0412\u0435\u0440\u0441\u0438\u0438 <code>UUID<\/code>, \u043d\u0435 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>UUIDv4<\/code>, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 5.4), \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0442 \u043f\u043b\u043e\u0445\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0432\u0441\u0442\u0430\u0432\u043a\u0430\u043c \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445 \u0432\u0440\u043e\u0434\u0435 B-tree \u0438 \u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\u0445\u00bb.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0430 Spring \u0410\u0439\u041e, \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412\u043e\u0442 \u0442\u0443\u0442 \u0430\u0432\u0442\u043e\u0440\u044b \u043d\u0435 \u043f\u043e\u044f\u0441\u043d\u044f\u044e\u0442, \u043d\u043e \u044f \u0434\u0443\u043c\u0430\u044e, \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e. \u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e <code>UUIDv4<\/code> \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439, \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u043a\u0430, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0442\u0440\u0451\u0445 \u0441\u0442\u0440\u043e\u043a \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c <code>UUIDv4<\/code> \u0432\u0435\u0434\u0435\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e:\u00a0<\/p>\n<p>1. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f 3 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0437 heap-\u0430 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 + 3 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 fsync \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u0441\u043a\u0430\u0436\u0435\u0442 \u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u043d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435.<\/p>\n<p>\u0421 <code>UUIDv7<\/code> \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0442\u043e\u0447\u043d\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0438, \u0442.\u043a. \u0432\u0441\u0435 3 \u043d\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u043a\u043e\u043d\u0435\u0446 btree.<\/p>\n<p>2.\u00a0 \u041a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, b-tree \u0441\u0430\u043c\u043e\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u0443\u044e\u0449\u0438\u0439\u0441\u044f. \u042d\u0442\u043e \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0441\u043f\u043b\u0438\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438 \u0442.\u043f.\u00a0\u0418\u0437-\u0437\u0430 \u0442\u0430\u043a\u043e\u0439 \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 UUIDv4 split \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u0435\u043a \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u0447\u0435\u043c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c\u00a0 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0440\u043e\u0442\u0430\u0446\u0438\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 (\u0441\u043f\u043b\u0438\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043b\u0438\u0442 \u0438 \u0442.\u0434.).<\/p>\n<p>\u0421\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439, <code>UUIDv7<\/code> \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0441\u043f\u043b\u0438\u0442\u0430\u043c \u0438 \u043c\u0435\u0440\u0434\u0436\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u0435\u043a \u0442\u043e\u0436\u0435, \u043d\u043e \u0438\u0445 \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u043d\u044c\u0448\u0435.<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 10+ \u043b\u0435\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0432\u0435\u043d\u0434\u043e\u0440\u044b \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439, \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439, \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443.<\/p>\n<p>RFC \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u0442 16 (!) \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 <code>UUID<\/code> \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441\u0430\u043c\u0438.<\/p>\n<p>\u0425\u043e\u0442\u044f RFC \u0432\u0432\u043e\u0434\u0438\u0442 \u0442\u0440\u0438 \u043d\u043e\u0432\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 <code>UUID<\/code>, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e <code>UUIDv7<\/code>. <code>UUIDv6<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u2014 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u043f\u0440\u044f\u043c\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f: \u00ab\u0421\u0438\u0441\u0442\u0435\u043c\u044b, \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0435 \u043e\u0442 <code>UUIDv1<\/code>, \u0414\u041e\u041b\u0416\u041d\u042b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>UUIDv7<\/code>\u00bb. <code>UUIDv8<\/code> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0434\u043b\u044f \u0432\u0435\u043d\u0434\u043e\u0440\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439.<\/p>\n<p><strong>UUIDv7 \u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0442\u0430\u0432\u043e\u043a \u0432 \u0438\u043d\u0434\u0435\u043a\u0441<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u0435\u0442\u043a\u0443 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Unix Epoch \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u0440\u0448\u0438\u0445 48 \u0431\u0438\u0442, \u0430 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f 74 \u0431\u0438\u0442\u0430 \u043e\u0442\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e\u0434 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0438\u0442\u043e\u0432 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u0432\u0435\u0440\u0441\u0438\u044f <code>UUID<\/code> \u0438 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\/variant). \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 <code>UUID<\/code> \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u043c \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438\/\u0438\u043b\u0438 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0412 \u0438\u0442\u043e\u0433\u0435 <code>UUIDv7<\/code> \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043e\u043d \u0443\u043d\u0438\u043a\u0430\u043b\u0435\u043d, \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0438 \u0438\u043c\u0435\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445.<\/p>\n<h2>UUIDv7 \u0432 PostgreSQL 18<\/h2>\n<p>\u0414\u043e \u0432\u044b\u0445\u043e\u0434\u0430 PostgreSQL 18 <code>UUIDv7<\/code> \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0441\u044f \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435. \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>gen_random_uuid()<\/code> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 <code>UUIDv4<\/code>, \u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <code>uuid-ossp<\/code>, \u0445\u043e\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 <code>UUID<\/code>, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043c\u0438, \u0447\u0442\u043e \u0431\u044b\u043b\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 RFC 4122.<\/p>\n<p>PostgreSQL 18 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e: <code>uuidv7()<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>UUIDv7<\/code>. \u0412 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Postgres \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 12-\u0431\u0438\u0442\u043d\u0430\u044f \u0441\u0443\u0431\u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u0430\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u0435\u0442\u043a\u0438 (\u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e, \u043d\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443). \u042d\u0442\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 <code>UUIDv7<\/code>, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e backend-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 Postgres (\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0441\u0441\u0438\u0438).<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0430 Spring \u0410\u0439\u041e, \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e\u0434 backend-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 fork \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 postmaster. \u042d\u0442\u043e\u0442 backend-\u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0448 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 backend \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432, \u043a\u0430\u043a \u0438\u0445 \u0447\u0430\u0441\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0432 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0440\ufffd\ufffd\u0434\u0430 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e, \u0438 \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u044b\u0439 increase \u0432 <code>UUIDv7<\/code>, \u043a\u0430\u043a \u0437\u0430\u044f\u0432\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u0440, \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e backend \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0418\u043c\u0435\u0439\u0442\u0435 \u044d\u0442\u043e \u0432 \u0432\u0438\u0434\u0443. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e.<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u0435\u0434\u0438\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u0431\u044b\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>uuidv4()<\/code> \u043a\u0430\u043a \u0430\u043b\u0438\u0430\u0441 \u0434\u043b\u044f <code>gen_random_uuid()<\/code>.<\/p>\n<p>\u0412\u044b\u0437\u043e\u0432 <code>uuidv7()<\/code> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u043e\u0432\u044b\u0439 <code>UUIDv7<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f. \u0415\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c <code>UUIDv7<\/code> \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b.<\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Postgres \u0434\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u0435\u0442\u043a\u0438 \u0438 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0437 <code>UUID<\/code> \u0442\u0430\u043a\u0436\u0435 \u0431\u044b\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441 \u0443\u0447\u0451\u0442\u043e\u043c <code>UUIDv7<\/code>. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n<pre><code class=\"sql\">postgres=# select uuidv7();                 uuidv7 --------------------------------------  0196ea4a-6f32-7fd0-a9d9-9c815a0750cd (1 row)  postgres=# select uuidv7(INTERVAL '1 day');                 uuidv7 --------------------------------------  0196ef74-8d09-77b0-a84b-5301262f05ad (1 row)  postgres=# SELECT uuid_extract_version(uuidv4());  uuid_extract_version ----------------------                     4 (1 row)  postgres=# SELECT uuid_extract_version(uuidv7());  uuid_extract_version ----------------------                     7 (1 row)  postgres=# SELECT uuid_extract_timestamp(uuidv7());    uuid_extract_timestamp ----------------------------  2025-05-19 20:50:40.381+00 (1 row)  postgres=# SELECT uuid_extract_timestamp(uuidv7(INTERVAL '1 hour'));    uuid_extract_timestamp ----------------------------  2025-05-19 21:50:59.388+00 (1 row)  postgres=# SELECT uuid_extract_timestamp(uuidv7(INTERVAL '-1 day'));    uuid_extract_timestamp ----------------------------  2025-05-18 20:51:15.774+00 (1 row) <\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>uuidv7()<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435, \u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u0435\u0442\u043a\u0443 \u0434\u0435\u043b\u0430\u0435\u0442 <code>UUID<\/code> \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u043b\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438:<\/p>\n<pre><code class=\"sql\">CREATE TABLE test (     id uuid DEFAULT uuidv7() PRIMARY KEY,     name text );  INSERT INTO test (name) VALUES ('foo'); INSERT INTO test (name) VALUES ('bar'); -- this will be sorted to the beginning of the list since we are making it 1h older than the other two INSERT INTO test (id, name) VALUES (uuidv7(INTERVAL '-1 hour'), 'oldest');  SELECT uuid_extract_timestamp(id), name FROM test ORDER BY id;     uuid_extract_timestamp   |  name ----------------------------+--------  2025-05-19 19:55:43.87+00  | oldest  2025-05-19 20:55:01.304+00 | foo  2025-05-19 20:55:01.305+00 | bar (3 rows) <\/code><\/pre>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 <a href=\"https:\/\/www.postgresql.org\/docs\/18\/functions-uuid.html\" rel=\"noopener noreferrer nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 PostgreSQL<\/a>. \u0410 \u0435\u0441\u043b\u0438 \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0434\u0435\u0442\u0430\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 <a href=\"https:\/\/git.postgresql.org\/gitweb\/?p=postgresql.git;a=commitdiff;h=78c5e141e\" rel=\"noopener noreferrer nofollow\">\u043f\u0430\u0442\u0447<\/a>.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>PostgreSQL 18 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0443 \u043e\u0446\u0435\u043d\u044f\u0442 \u043e\u043f\u044b\u0442\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438. \u041d\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 <code>UUIDv7<\/code> \u2014 \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e\u0435, \u043d\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0435 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0440\u0435\u0448\u0430\u044e\u0449\u0435\u0435 \u0434\u0430\u0432\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p><code>UUID<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b\u0438 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441\u043e\u043c: \u043e\u043d\u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u044b, \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u2014 \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0442\u0440\u0430\u0434\u0430\u043b\u0438 \u043e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 B-tree \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445. <code>UUIDv7<\/code> \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u043b\u0443\u0447\u0448\u0435\u0435 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043c\u0438\u0440\u043e\u0432: \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0443\u044e \u0441 B-tree \u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430\u043c\u0438 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c. PostgreSQL 18 \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0438\u043c\u0438 \u0435\u0449\u0451 \u0443\u0434\u043e\u0431\u043d\u0435\u0435.<\/p>\n<hr\/>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/258\/484\/92d\/25848492d4cd2dcd1df595e475569a9a.png\" width=\"1560\" height=\"334\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/258\/484\/92d\/25848492d4cd2dcd1df595e475569a9a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/258\/484\/92d\/25848492d4cd2dcd1df595e475569a9a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u043a\u00a0\u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043d\u0430\u00a0Spring Boot \u0432\u00a0\u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u00a0\u2014\u00a0<a href=\"https:\/\/t.me\/+oBwACbkvJ19iODAy\" rel=\"noopener noreferrer nofollow\">Spring \u0410\u0439\u041e<\/a>, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u0432 \u043a\u0443\u0440\u0441\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 \u043c\u0438\u0440\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 Spring Boot \u0438 \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u0441 \u043d\u0438\u043c \u0441\u0432\u044f\u0437\u0430\u043d\u043e.<\/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\/946168\/\"> https:\/\/habr.com\/ru\/articles\/946168\/<\/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>\u0421\u043e\u0432\u0441\u0435\u043c \u0441\u043a\u043e\u0440\u043e (\u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f) \u0432\u044b\u0439\u0434\u0435\u0442 PostgreSQL 18. \u0420\u0435\u043b\u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u0438\u0442 \u0432\u0430\u0436\u043d\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u2014 \u043e\u0442 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e I\/O \u0434\u043e EXPLAIN \u0441 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438 CPU \u0438 WAL.\u00a0<\/p>\n<p>\u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u0440\u043e\u043c\u043a\u0430\u044f \u043d\u043e\u0432\u0438\u043d\u043a\u0430 \u2014 \u043d\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 UUIDv7, \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432, \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u043b\u044f B-tree \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432.\u00a0<\/p>\n<p>\u0412 \u043d\u043e\u0432\u043e\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <a href=\"https:\/\/t.me\/+QmrKn0wA8CdkNjAy\" rel=\"noopener noreferrer nofollow\">Spring \u0410\u0439\u041e<\/a> \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 UUIDv7 \u0438 \u0447\u0435\u043c \u043e\u043d \u043b\u0443\u0447\u0448\u0435 UUIDv4 \u0434\u043b\u044f \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c.<\/p>\n<hr\/>\n<h2>UUIDv7 \u0432 PostgreSQL 18<\/h2>\n<p>PostgreSQL 18 \u0443\u0436\u0435 \u043d\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0435 \u2014 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c \u0431\u0435\u0442\u0430-\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0421\u0440\u0435\u0434\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u0432 \u044d\u0442\u043e\u043c \u0440\u0435\u043b\u0438\u0437\u0435 \u2014 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 <code>UUIDv7<\/code>. \u042d\u0442\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442 <code>UUID<\/code> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u0435\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 B-tree \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <code>UUID<\/code>, \u0447\u0435\u043c \u043f\u043e\u043b\u0435\u0437\u0435\u043d <code>UUIDv7<\/code> \u0438 \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 PostgreSQL.<\/p>\n<h2>PostgreSQL 18<\/h2>\n<p><a href=\"https:\/\/www.postgresql.org\/about\/news\/postgresql-18-beta-1-released-3070\/\" rel=\"noopener noreferrer nofollow\">Beta-\u0432\u0435\u0440\u0441\u0438\u044f PostgreSQL 18 (beta 1) \u0432\u044b\u0448\u043b\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e<\/a>. \u0420\u0435\u043b\u0438\u0437 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447, \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439. \u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0438 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0431\u0430\u0433\u0430\u0445 \u2014 \u0446\u0435\u043b\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 \u0432 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0435.<\/p>\n<p>\u0421\u0440\u0435\u0434\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0439:<\/p>\n<ul>\n<li>\n<p>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 I\/O (\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <code>io_uring<\/code>) \u2014 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 (<code>seqscan<\/code>) \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 VACUUM \u0432 2\u20133 \u0440\u0430\u0437\u0430<\/p>\n<\/li>\n<li>\n<p>\u201c\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u201d \u0432 \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u0445 B-tree \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0443\u043c\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f OR\/IN. <\/p>\n<p>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0430 Spring \u0410\u0439\u041e, \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0438: <span class=\"habrahidden\">\u0420\u0435\u0447\u044c \u043f\u0440\u043e\u00a0\u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u00abskip scan\u00bb. \u042d\u0442\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u00a0\u0440\u0430\u043c\u043a\u0430\u0445 Postgres 18, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u043c\u0443\u043b\u044c\u0442\u0438\u043a\u043e\u043b\u043e\u043d\u043e\u0447\u043d\u044b\u0439 btree \u0438\u043d\u0434\u0435\u043a\u0441. \u041f\u043e\u043a\u0430 \u0443\u0441\u0442\u043e\u044f\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u0432\u00a0\u0441\u0435\u0442\u0438 \u0442\u0435\u0440\u043c\u0438\u043d\u0430 \u0434\u043b\u044f\u00a0\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u043d\u0430\u00a0\u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u044f \u043f\u043e\u00a0\u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u043d\u0435\u00a0\u0437\u043d\u0430\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u0435\u0440\u0435\u0432\u0435\u043b\u0438 \u043a\u0430\u043a \u00ab\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u00bb.<\/span><\/p>\n<p><span class=\"habrahidden\">\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430\u00a0\u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043a\u0440\u0430\u0439\u043d\u0435 \u0432\u0430\u0436\u043d\u0430\u044f, \u043d\u043e\u00a0\u043e\u043d\u0430 \u043d\u0435\u00a0\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0446\u0435\u043b\u044c\u044e \u0441\u0442\u0430\u0442\u044c\u0438. \u041f\u043e\u0437\u0436\u0435, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0441\u044c\u0431\u044b, \u043c\u044b \u043f\u0440\u043e\u00a0\u043d\u0435\u0451 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u0432\u00a0\u0434\u0435\u0442\u0430\u043b\u044f\u0445, \u0438 \u043a\u0430\u043a\u00a0\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/span><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 \u043f\u0440\u0438 major \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u0445<\/p>\n<\/li>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 <code>UUIDv7<\/code><\/p>\n<\/li>\n<li>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b<\/p>\n<\/li>\n<li>\n<p>\u0412\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 OAuth \u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 <code>md5<\/code><\/p>\n<\/li>\n<li>\n<p>EXPLAIN ANALYZE \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 I\/O, CPU, WAL<\/p>\n<\/li>\n<li>\n<p>\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, LIKE \u0434\u043b\u044f \u043d\u0435\u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (\u0440\u0435\u0447\u044c \u043f\u0440\u043e collation), casefolding<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438: 3.2 (\u043f\u0435\u0440\u0432\u0430\u044f \u0441 2003 \u0433\u043e\u0434\u0430!)<\/p>\n<\/li>\n<\/ul>\n<p>\u0425\u043e\u0442\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>uuidv7()<\/code> \u2014 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u00ab\u0433\u0440\u043e\u043c\u043a\u0430\u044f\u00bb \u0444\u0438\u0447\u0430 \u0440\u0435\u043b\u0438\u0437\u0430 (\u044d\u0442\u043e \u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u0435\u0435 \u0434\u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u043c\u0443 I\/O), \u043e\u043d\u0430, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0441\u0430\u043c\u0430\u044f \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u0430\u044f. \u0415\u0451 \u0447\u0443\u0442\u044c \u0431\u044b\u043b\u043e \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0435\u0449\u0451 \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 17, \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u043e\u0447\u0430\u0440\u043e\u0432\u0430\u043d\u044b, \u0447\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e.<\/p>\n<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 UUID \u0438 \u0437\u0430\u0447\u0435\u043c \u043e\u043d \u043d\u0443\u0436\u0435\u043d?<\/h2>\n<p><code>UUID<\/code> \u2014 \u044d\u0442\u043e 128-\u0431\u0438\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u0430\u043a \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432: \u043e\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0439 \u0434\u043e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0439. \u041e\u043d\u0438 \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438 \u043c\u043e\u0433\u0443\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u0438\u0441\u0442\u0435\u043c \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u043c\u0435\u0442\u044c \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u0438\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u0432 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043d\u044b\u0435 \u0442\u0438\u043f\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>SERIAL<\/code> \u0438\u043b\u0438 <code>IDENTITY<\/code>). \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 (\u0445\u043e\u0442\u044f \u0434\u0430\u0436\u0435 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438), \u043d\u043e \u043f\u0440\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445.<\/p>\n<p><code>UUID<\/code> \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445:<\/p>\n<h4>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0432 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u0411\u0414<\/h4>\n<p>\u0425\u043e\u0442\u044f \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0421\u0423\u0411\u0414 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u043d\u044b\u0435 (<code>identity<\/code>) \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u043e\u043d\u0438 \u0438\u043c\u0435\u044e\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<h4>\u041d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b<\/h4>\n<p>\u041f\u0440\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 <code>UUID<\/code> \u043d\u0435\u043b\u044c\u0437\u044f \u0443\u0433\u0430\u0434\u0430\u0442\u044c, \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0415\u0441\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442, \u0437\u043b\u043e\u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u0438\u043a \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 ID, \u0438 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0438\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0432\u0430\u0448\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0438 \u0442.\u043f.<\/p>\n<h4>\u041f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e<\/h4>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 UUID \u0434\u0430\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0431\u0435\u0437 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0446\u0438\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0438 serverless \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430\u0445, \u0433\u0434\u0435 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u0438\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c <code>UUID<\/code> \u0448\u0438\u0440\u043e\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u0438 \u0442\u0440\u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <code>UUID<\/code> \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<ol>\n<li>\n<p><strong>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430:<\/strong> <code>UUID<\/code> \u043d\u0435 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u044b \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0432 \u043a\u0430\u043a\u043e\u043c-\u043b\u0438\u0431\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445:<\/strong> \u041d\u043e\u0432\u044b\u0435 <code>UUID<\/code> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0440\u0430\u0437\u0434\u0443\u0442\u0438\u044e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e. <\/p>\n<p>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0430 Spring \u0410\u0439\u041e, \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0438: <span class=\"habrahidden\">\u041d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443, \u0434\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e Btree \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u043e\u043a\u043b\u0430\u0434 \u0412\u043b\u0430\u0434\u0438\u043c\u0438\u0440\u0430 \u0421\u0438\u0442\u043d\u0438\u043a\u043e\u0432\u0430: https:\/\/www.youtube.com\/watch?v=y-Wtyvme4gE<\/span><\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0437\u043c\u0435\u0440:<\/strong> <code>UUID<\/code> \u2014 \u044d\u0442\u043e 128-\u0431\u0438\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 INT (32-\u0431\u0438\u0442) \u0438\u043b\u0438 BIGINT (64-\u0431\u0438\u0442) \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439. \u0414\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0449\u0443\u0442\u0438\u043c\u044b\u043c \u043e\u0432\u0435\u0440\u0445\u0435\u0434\u043e\u043c.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a <code>UUIDv7<\/code> \u0440\u0435\u0448\u0430\u0435\u0442 \u0434\u0432\u0435 \u0438\u0437 \u0442\u0440\u0451\u0445 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c.<\/p>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440 <code>UUID<\/code> \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043f\u0440\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u043c \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043b\u0438 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u0443\u043c\u0435\u044e\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c 128-\u0431\u0438\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0437\u0430 \u043e\u0434\u043d\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, CMEQ \u2014 \u0447\u0430\u0441\u0442\u044c SIMD-\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 <code>UUID<\/code> \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <code>UUID<\/code> (\u0442\u0438\u043f <code>UUID<\/code>) \u043a\u0430\u043a \u0432 \u0431\u0430\u0437\u0435, \u0442\u0430\u043a \u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u0430 \u043d\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435.<\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d UUIDv7?<\/h2>\n<p><code>UUID<\/code> \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0431\u044b\u043b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0432 <a href=\"https:\/\/tools.ietf.org\/html\/rfc4122\" rel=\"noopener noreferrer nofollow\">RFC 4122<\/a> \u0432 2005 \u0433\u043e\u0434\u0443. \u042d\u0442\u043e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u043f\u044f\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432\/\u0432\u0435\u0440\u0441\u0438\u0439 <code>UUID<\/code>, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b 1 \u0438 4. \u041f\u043e\u0437\u0436\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u2014 \u0432 \u043c\u0430\u0435 2024 \u0433\u043e\u0434\u0430 \u0431\u044b\u043b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d <a href=\"https:\/\/tools.ietf.org\/html\/rfc9562\" rel=\"noopener noreferrer nofollow\">RFC 9562<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432\u0435\u0440\u0441\u0438\u0438 6\u20138 (\u0445\u043e\u0442\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0430\u044f \u0447\u0435\u0440\u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0435\u0449\u0451 \u0432 2020 \u0433\u043e\u0434\u0443). \u0421 \u0434\u043d\u0451\u043c \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f, RFC 9562 \u0438 <code>UUIDv7<\/code>!<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, RFC 9562 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f UUID \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<p>\u00ab\u041e\u0434\u043d\u0430 \u0438\u0437 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439, \u0433\u0434\u0435 <code>UUID<\/code> \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0448\u0438\u0440\u043e\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435, \u2014 \u044d\u0442\u043e \u043a\u043b\u044e\u0447\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 &#8230; \u043d\u043e \u0432\u0435\u0440\u0441\u0438\u0438 <code>UUID<\/code> 1\u20135, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0432 [RFC4122], \u043b\u0438\u0448\u0435\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>\u0412\u0435\u0440\u0441\u0438\u0438 <code>UUID<\/code>, \u043d\u0435 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>UUIDv4<\/code>, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 5.4), \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0442 \u043f\u043b\u043e\u0445\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0432\u0441\u0442\u0430\u0432\u043a\u0430\u043c \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u0445 \u0432\u0440\u043e\u0434\u0435 B-tree \u0438 \u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\u0445\u00bb.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0430 Spring \u0410\u0439\u041e, \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412\u043e\u0442 \u0442\u0443\u0442 \u0430\u0432\u0442\u043e\u0440\u044b \u043d\u0435 \u043f\u043e\u044f\u0441\u043d\u044f\u044e\u0442, \u043d\u043e \u044f \u0434\u0443\u043c\u0430\u044e, \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e. \u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e <code>UUIDv4<\/code> \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439, \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u043a\u0430, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0442\u0440\u0451\u0445 \u0441\u0442\u0440\u043e\u043a \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c <code>UUIDv4<\/code> \u0432\u0435\u0434\u0435\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e:\u00a0<\/p>\n<p>1. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f 3 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0437 heap-\u0430 \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 + 3 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 fsync \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u044b, \u0441\u043a\u0430\u0436\u0435\u0442 \u043e\u043f\u044b\u0442\u043d\u044b\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u043d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435.<\/p>\n<p>\u0421 <code>UUIDv7<\/code> \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0447\u0442\u0438 \u0442\u043e\u0447\u043d\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0438, \u0442.\u043a. \u0432\u0441\u0435 3 \u043d\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u043a\u043e\u043d\u0435\u0446 btree.<\/p>\n<p>2.\u00a0 \u041a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, b-tree \u0441\u0430\u043c\u043e\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u0443\u044e\u0449\u0438\u0439\u0441\u044f. \u042d\u0442\u043e \u0434\u043e\u0441\u0442\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0441\u043f\u043b\u0438\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438 \u0442.\u043f.\u00a0\u0418\u0437-\u0437\u0430 \u0442\u0430\u043a\u043e\u0439 \u0440\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 UUIDv4 split \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u0435\u043a \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u0447\u0435\u043c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c\u00a0 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0440\u043e\u0442\u0430\u0446\u0438\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 (\u0441\u043f\u043b\u0438\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043b\u0438\u0442 \u0438 \u0442.\u0434.).<\/p>\n<p>\u0421\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439, <code>UUIDv7<\/code> \u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0441\u043f\u043b\u0438\u0442\u0430\u043c \u0438 \u043c\u0435\u0440\u0434\u0436\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u0435\u043a \u0442\u043e\u0436\u0435, \u043d\u043e \u0438\u0445 \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u043d\u044c\u0448\u0435.<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 10+ \u043b\u0435\u0442 \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043a\u0440\u0443\u043f\u043d\u044b\u0435 \u0432\u0435\u043d\u0434\u043e\u0440\u044b \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439, \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439, \u0440\u0435\u0448\u0430\u044e\u0449\u0438\u0445 \u043e\u0434\u043d\u0443 \u0438 \u0442\u0443 \u0436\u0435 \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443.<\/p>\n<p>RFC \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u0442 16 (!) \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 <code>UUID<\/code> \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441\u0430\u043c\u0438.<\/p>\n<p>\u0425\u043e\u0442\u044f RFC \u0432\u0432\u043e\u0434\u0438\u0442 \u0442\u0440\u0438 \u043d\u043e\u0432\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 <code>UUID<\/code>, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e <code>UUIDv7<\/code>. <code>UUIDv6<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u2014 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u043f\u0440\u044f\u043c\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f: \u00ab\u0421\u0438\u0441\u0442\u0435\u043c\u044b, \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0435 \u043e\u0442 <code>UUIDv1<\/code>, \u0414\u041e\u041b\u0416\u041d\u042b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>UUIDv7<\/code>\u00bb. <code>UUIDv8<\/code> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0434\u043b\u044f \u0432\u0435\u043d\u0434\u043e\u0440\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439.<\/p>\n<p><strong>UUIDv7 \u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<li>\n<p>\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0442\u0430\u0432\u043e\u043a \u0432 \u0438\u043d\u0434\u0435\u043a\u0441<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u0435\u0442\u043a\u0443 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Unix Epoch \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u0440\u0448\u0438\u0445 48 \u0431\u0438\u0442, \u0430 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f 74 \u0431\u0438\u0442\u0430 \u043e\u0442\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u043e\u0434 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0438\u0442\u043e\u0432 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u0432\u0435\u0440\u0441\u0438\u044f <code>UUID<\/code> \u0438 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f\/variant). \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 <code>UUID<\/code> \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u043c \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u043e\u0439 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0438\/\u0438\u043b\u0438 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0412 \u0438\u0442\u043e\u0433\u0435 <code>UUIDv7<\/code> \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0432 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445: \u043e\u043d \u0443\u043d\u0438\u043a\u0430\u043b\u0435\u043d, \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0438 \u0438\u043c\u0435\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0445.<\/p>\n<h2>UUIDv7 \u0432 PostgreSQL 18<\/h2>\n<p>\u0414\u043e \u0432\u044b\u0445\u043e\u0434\u0430 PostgreSQL 18 <code>UUIDv7<\/code> \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0441\u044f \u043d\u0430 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435. \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>gen_random_uuid()<\/code> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 <code>UUIDv4<\/code>, \u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <code>uuid-ossp<\/code>, \u0445\u043e\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 <code>UUID<\/code>, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043c\u0438, \u0447\u0442\u043e \u0431\u044b\u043b\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 RFC 4122.<\/p>\n<p>PostgreSQL 18 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e: <code>uuidv7()<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>UUIDv7<\/code>. \u0412 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Postgres \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 12-\u0431\u0438\u0442\u043d\u0430\u044f \u0441\u0443\u0431\u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u0430\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u0435\u0442\u043a\u0438 (\u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e, \u043d\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443). \u042d\u0442\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 <code>UUIDv7<\/code>, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e backend-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 Postgres (\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0441\u0441\u0438\u0438).<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u0430 Spring \u0410\u0439\u041e, \u041c\u0438\u0445\u0430\u0438\u043b\u0430 \u041f\u043e\u043b\u0438\u0432\u0430\u0445\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e\u0434 backend-\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 fork<\/p>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-474723","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/474723","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=474723"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/474723\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=474723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=474723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=474723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}