Title: Feature: Support Optimizer Hints in generated queries · Issue #4353 · sqlc-dev/sqlc · GitHub
Open Graph Title: Feature: Support Optimizer Hints in generated queries · Issue #4353 · sqlc-dev/sqlc
X Title: Feature: Support Optimizer Hints in generated queries · Issue #4353 · sqlc-dev/sqlc
Description: What do you want to change? Add support for MySQL Optimizer Hints. When a query contains Optimizer Hints, the generated code should preserve them as-is. For example, the following query: SELECT /*+ MAX_EXECUTION_TIME(1000) */ * FROM t1 I...
Open Graph Description: What do you want to change? Add support for MySQL Optimizer Hints. When a query contains Optimizer Hints, the generated code should preserve them as-is. For example, the following query: SELECT /*+...
X Description: What do you want to change? Add support for MySQL Optimizer Hints. When a query contains Optimizer Hints, the generated code should preserve them as-is. For example, the following query: SELECT /*+...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/4353
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature: Support Optimizer Hints in generated queries","articleBody":"### What do you want to change?\n\nAdd support for MySQL [Optimizer Hints](https://dev.mysql.com/doc/refman/9.6/en/optimizer-hints.html).\n\nWhen a query contains Optimizer Hints, the generated code should preserve them as-is. For example, the following query:\n\n```sql\nSELECT /*+ MAX_EXECUTION_TIME(1000) */ * FROM t1 INNER JOIN t2 WHERE ...\n```\n\nshould produce generated code that retains the `/*+ ... */` hint comment in the query string, rather than stripping it out.\n\n\n### What database engines need to be changed?\n\nMySQL\n\n### What programming language backends need to be changed?\n\n_No response_","author":{"url":"https://github.com/replu","@type":"Person","name":"replu"},"datePublished":"2026-03-24T15:01:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/4353/sqlc/issues/4353"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:436b288b-b69f-4bc3-a1f8-57dd42be6b14 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEA6:177F6A:9CE573:D38D76:6A505C60 |
| html-safe-nonce | fefd33d2a8e839f65035ce87a15c8c40f80d4c42d5c5af0d8047d174d34c0f7e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUE2OjE3N0Y2QTo5Q0U1NzM6RDM4RDc2OjZBNTA1QzYwIiwidmlzaXRvcl9pZCI6IjE0ODkwMjA2NzYwMzU1OTk0NTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7b6e58d436144b5fe6914f445fe31f9d940f92541f16b6dcf38b02cc427bcf0c |
| hovercard-subject-tag | issue:4128590516 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlc-dev/sqlc/4353/issue_layout |
| twitter:image | https://opengraph.githubassets.com/51c5b378483420a4f65dd32a609752218d91b9bc004180af689a5f7e1f12e59b/sqlc-dev/sqlc/issues/4353 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/51c5b378483420a4f65dd32a609752218d91b9bc004180af689a5f7e1f12e59b/sqlc-dev/sqlc/issues/4353 |
| og:image:alt | What do you want to change? Add support for MySQL Optimizer Hints. When a query contains Optimizer Hints, the generated code should preserve them as-is. For example, the following query: SELECT /*+... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | replu |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git |
| octolytics-dimension-user_id | 136738596 |
| octolytics-dimension-user_login | sqlc-dev |
| octolytics-dimension-repository_id | 193160679 |
| octolytics-dimension-repository_nwo | sqlc-dev/sqlc |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193160679 |
| octolytics-dimension-repository_network_root_nwo | sqlc-dev/sqlc |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width