René's URL Explorer Experiment


Title: JavaGuide/docs/high-performance/sql-optimization.md at main · lsf417/JavaGuide · GitHub

Open Graph Title: JavaGuide/docs/high-performance/sql-optimization.md at main · lsf417/JavaGuide

X Title: JavaGuide/docs/high-performance/sql-optimization.md at main · lsf417/JavaGuide

Description: Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发与系统设计。准备后端技术面试,首选 JavaGuide! - JavaGuide/docs/high-performance/sql-optimization.md at main · lsf417/JavaGuide

Open Graph Description: Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发与系统设计。准备后端技术面试,首选 JavaGuide! - lsf417/JavaGuide

X Description: Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发与系统设计。准备后端技术面试,首选 JavaGuide! - lsf417/JavaGuide

Opengraph URL: https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/blob/*name(/*path)
route-controllerblob
route-actionshow
fetch-noncev2:8ee3f3dc-4a77-a088-54e5-0625c36b6e96
current-catalog-service-hashf3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb
request-id8698:3F6E8D:6E3FAEA:973EF05:6A5E91EB
html-safe-nonce480af2cf14c36fd455e1a7d90d6bf3ab1d9c75abaa7263b14ea319bb2e80e861
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Njk4OjNGNkU4RDo2RTNGQUVBOjk3M0VGMDU6NkE1RTkxRUIiLCJ2aXNpdG9yX2lkIjoiOTA3MTMxNDAxNzIxOTE1NDQxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac2f2358693a5bd2680443796b8dcec71d934294698e14b545d0da107150ce5b06
hovercard-subject-tagrepository:1175144032
github-keyboard-shortcutsrepository,source-code,file-tree,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///blob/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md
twitter:imagehttps://opengraph.githubassets.com/0cddda0bbd574e8d19c9cfbde060299a67fd151cd7cfb1ef30e1fbe8fdf07e88/lsf417/JavaGuide
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0cddda0bbd574e8d19c9cfbde060299a67fd151cd7cfb1ef30e1fbe8fdf07e88/lsf417/JavaGuide
og:image:altJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发与系统设计。准备后端技术面试,首选 JavaGuide! - lsf417/JavaGuide
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7c7e31acb6a895494e518b880f5ccf39604f7fa9a8f2f3c64145efc3b776256d
turbo-cache-controlno-cache
go-importgithub.com/lsf417/JavaGuide git https://github.com/lsf417/JavaGuide.git
octolytics-dimension-user_id65153030
octolytics-dimension-user_loginlsf417
octolytics-dimension-repository_id1175144032
octolytics-dimension-repository_nwolsf417/JavaGuide
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id132464395
octolytics-dimension-repository_parent_nwoSnailclimb/JavaGuide
octolytics-dimension-repository_network_root_id132464395
octolytics-dimension-repository_network_root_nwoSnailclimb/JavaGuide
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2d2ac9bdd71d5f53f2b731c9330677e38624e301
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flsf417%2FJavaGuide%2Fblob%2Fmain%2Fdocs%2Fhigh-performance%2Fsql-optimization.md
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flsf417%2FJavaGuide%2Fblob%2Fmain%2Fdocs%2Fhigh-performance%2Fsql-optimization.md
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fblob%2Fshow&source=header-repo&source_repo=lsf417%2FJavaGuide
Reloadhttps://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md
Reloadhttps://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md
Reloadhttps://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md
lsf417 https://github.com/lsf417
JavaGuidehttps://github.com/lsf417/JavaGuide
Snailclimb/JavaGuidehttps://github.com/Snailclimb/JavaGuide
Notifications https://github.com/login?return_to=%2Flsf417%2FJavaGuide
Fork 0 https://github.com/login?return_to=%2Flsf417%2FJavaGuide
Star 0 https://github.com/login?return_to=%2Flsf417%2FJavaGuide
Code https://github.com/lsf417/JavaGuide
Pull requests 0 https://github.com/lsf417/JavaGuide/pulls
Actions https://github.com/lsf417/JavaGuide/actions
Projects https://github.com/lsf417/JavaGuide/projects
Security and quality 0 https://github.com/lsf417/JavaGuide/security
Insights https://github.com/lsf417/JavaGuide/pulse
Code https://github.com/lsf417/JavaGuide
Pull requests https://github.com/lsf417/JavaGuide/pulls
Actions https://github.com/lsf417/JavaGuide/actions
Projects https://github.com/lsf417/JavaGuide/projects
Security and quality https://github.com/lsf417/JavaGuide/security
Insights https://github.com/lsf417/JavaGuide/pulse
https://github.com/lsf417/JavaGuide
JavaGuidehttps://github.com/lsf417/JavaGuide/tree/main
docshttps://github.com/lsf417/JavaGuide/tree/main/docs
high-performancehttps://github.com/lsf417/JavaGuide/tree/main/docs/high-performance
Historyhttps://github.com/lsf417/JavaGuide/commits/main/docs/high-performance/sql-optimization.md
https://github.com/lsf417/JavaGuide/commits/main/docs/high-performance/sql-optimization.md
JavaGuidehttps://github.com/lsf417/JavaGuide/tree/main
docshttps://github.com/lsf417/JavaGuide/tree/main/docs
high-performancehttps://github.com/lsf417/JavaGuide/tree/main/docs/high-performance
Rawhttps://github.com/lsf417/JavaGuide/raw/refs/heads/main/docs/high-performance/sql-optimization.md
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#避免使用-select-
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#尽量避免多表做-join
https://camo.githubusercontent.com/4a50b4955a64897cabc4474f318e0e97367d31ab400ca54112a00f9f961a999e/68747470733a2f2f6f73732e6a61766167756964652e636e2f6769746875622f6a61766167756964652f6d7973716c2f616c69626162612d6a6176612d646576656c6f706d656e742d68616e64626f6f6b2d6d756c74692d7461626c652d6a6f696e2e706e67
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#深度分页优化
深度分页介绍及优化建议https://javaguide.cn/high-performance/deep-pagination-optimization.html
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#建议不要使用外键与级联
https://camo.githubusercontent.com/123167b3c8045e4f686c1a6451be55f398c8dacf55df5fc6efc03f5eaa3bb205/68747470733a2f2f6f73732e6a61766167756964652e636e2f6769746875622f6a61766167756964652f6d7973716c2f616c69626162612d6a6176612d646576656c6f706d656e742d68616e64626f6f6b2d6d756c74692d7461626c652d6a6f696e2d666f726569676e2d6b6579732d616e642d63617363616465732e706e67
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#选择合适的字段类型
MySQL 时间类型数据存储建议https://javaguide.cn/database/mysql/some-thoughts-on-database-storage-time.html
BigDecimal 详解https://javaguide.cn/java/basis/bigdecimal.html
数据库主键一定要自增吗?有哪些场景不建议自增?https://mp.weixin.qq.com/s/vNRIFKjbe7itRTxmq-bkAA
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#尽量用-union-all-代替-union
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#优先使用批量操作
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#show-profile-分析-sql-执行性能
SHOW PROFILEhttps://dev.mysql.com/doc/refman/5.7/en/show-profile.html
SHOW PROFILEShttps://dev.mysql.com/doc/refman/5.7/en/show-profiles.html
Performance Schemahttps://dev.mysql.com/doc/refman/8.0/en/performance-schema.html
https://camo.githubusercontent.com/85d4ce2fa2f3dcd59ee76846b247d194f2ee1e5cb7b818f1091f2af63b752f75/68747470733a2f2f6f73732e6a61766167756964652e636e2f6769746875622f6a61766167756964652f6d7973716c2f6d7973716c2d73686f772d7661726961626c65732d70726f66696c696e672e706e67
https://camo.githubusercontent.com/e653e0577883a37e793652eb7de870cdc1eee4b788df86de93dbffa5a41a9ded/68747470733a2f2f6f73732e6a61766167756964652e636e2f6769746875622f6a61766167756964652f6d7973716c2f6d7973716c2d73686f772d70726f66696c65732d72616e6b696e672d6c6973742d7461626c652e706e67
https://camo.githubusercontent.com/4826c26371ab080b1bec57c955139186d2471150058628bdafd4b93da746b661/68747470733a2f2f6f73732e6a61766167756964652e636e2f6769746875622f6a61766167756964652f6d7973716c2f6d7973716c2d73686f772d70726f66696c65732d6370752d6970632e706e67
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#优化慢-sql
MySQL 执行计划分析https://javaguide.cn/database/mysql/mysql-query-execution-plan.html
慢 SQL 治理经验总结https://mp.weixin.qq.com/s/LZRSQJufGRpRw6u4h_Uyww
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#正确使用索引
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#选择合适的字段创建索引
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#避免索引失效
Bug #109145 Using index for skip scan cause incorrect resulthttps://bugs.mysql.com/bug.php?id=109145
MySQL隐式转换造成索引失效https://javaguide.cn/database/mysql/index-invalidation-caused-by-implicit-conversion.html
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#被频繁更新的字段应该慎重建立索引
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#尽可能的考虑建立联合索引而不是单列索引
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#注意避免冗余索引
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#考虑在字符串类型的字段上使用前缀索引代替普通索引
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#删除长期未使用的索引
https://github.com/lsf417/JavaGuide/blob/main/docs/high-performance/sql-optimization.md#参考
https://dev.mysql.com/doc/refman/8.0/en/statement-optimization.htmlhttps://dev.mysql.com/doc/refman/8.0/en/statement-optimization.html
https://mp.weixin.qq.com/s/GSGVFkDLz1hZ1OjGndUjZghttps://mp.weixin.qq.com/s/GSGVFkDLz1hZ1OjGndUjZg
https://mp.weixin.qq.com/s/IOHvtel2KLNi-Ol4UBivbQhttps://mp.weixin.qq.com/s/IOHvtel2KLNi-Ol4UBivbQ
https://segmentfault.com/a/1190000008131735https://segmentfault.com/a/1190000008131735
https://kalacloud.com/blog/how-to-use-mysql-slow-query-log-profiling-mysqldumpslow/https://kalacloud.com/blog/how-to-use-mysql-slow-query-log-profiling-mysqldumpslow/
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.