Title: FEATURE REQUEST: SQL comments · Issue #95 · ExoQuery/ExoQuery · GitHub
Open Graph Title: FEATURE REQUEST: SQL comments · Issue #95 · ExoQuery/ExoQuery
X Title: FEATURE REQUEST: SQL comments · Issue #95 · ExoQuery/ExoQuery
Description: It is important to be able to place comments in SQL, sometimes used for: hints to the database settings documenting running queries for tracking by DBA's tracing Comments before/after SQL are very common, but sometimes even within. Some ...
Open Graph Description: It is important to be able to place comments in SQL, sometimes used for: hints to the database settings documenting running queries for tracking by DBA's tracing Comments before/after SQL are very ...
X Description: It is important to be able to place comments in SQL, sometimes used for: hints to the database settings documenting running queries for tracking by DBA's tracing Comments before/after SQL are v...
Opengraph URL: https://github.com/ExoQuery/ExoQuery/issues/95
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"FEATURE REQUEST: SQL comments","articleBody":"It is important to be able to place comments in SQL, sometimes used for:\n\n* hints to the database\n* settings\n* documenting running queries for tracking by DBA's\n* tracing\n\nComments before/after SQL are very common, but sometimes even within.\n\nSome SQL elements need comments before/after and some of this might be satisfied by FREE BLOCKS. \n\nexamples from MySQL:\n\n```\n-- optimizer to use the Block Nested Loop\nSELECT /*+ BNL(t1, t2) */ * FROM t1 JOIN t2 ON t1.id = t2.t1_id;\n\n-- version specific\nCREATE TABLE t1 (a INT, KEY (a)) /*!50701 USING BTREE */;\n\n-- marking queries so others know what is running, easy to see in Dolphie or PMM\n/* adhoc - Fred */ SELECT * FROM megatable;\n\n-- after, some people do it after\nSELECT * FROM megatable; /* adhoc - Fred */\n\n-- tracing\n/* traceid-1234 */ SELECT ...\nSELECT ... /* traceid=1234 */\n\n-- from the docs:\nSELECT /*+ NO_RANGE_OPTIMIZATION(t3 PRIMARY, f2_idx) */ f1\n FROM t3 WHERE f1 > 30 AND f1 \u003c 33;\nSELECT /*+ BKA(t1) NO_BKA(t2) */ * FROM t1 INNER JOIN t2 WHERE ...;\nSELECT /*+ NO_ICP(t1, t2) */ * FROM t1 INNER JOIN t2 WHERE ...;\nSELECT /*+ SEMIJOIN(FIRSTMATCH, LOOSESCAN) */ * FROM t1 ...;\nEXPLAIN SELECT /*+ NO_ICP(t1) */ * FROM t1 WHERE ...;\nSELECT /*+ MERGE(dt) */ * FROM (SELECT * FROM t1) AS dt;\nINSERT /*+ SET_VAR(foreign_key_checks=OFF) */ INTO t2 VALUES(2);\n```\n\nthis might be similar to solving other inserts pre/post other aspects of a query, for example FORCE INDEX or USE INDEX type hints which are not in comments.\n\n```\nSELECT column1, column2\nFROM table_name FORCE INDEX (index_name_1, index_name_2, ...)\nWHERE condition;\n```\n\nif it is possible with free blocks at any position, then we can always write our own extensions that help with our particular databases.\n\nSo this could split out into multiple issues depending on what is supported natively.","author":{"url":"https://github.com/apatrida","@type":"Person","name":"apatrida"},"datePublished":"2026-02-06T19:33:34Z","url":"https://github.com/ExoQuery/ExoQuery/issues/95"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:57deea4b-149e-959a-0e70-8e22320c2d66 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA66:2A59EB:321D5A:4286C3:6AFBB978 |
| html-safe-nonce | a025f3ba2d4c7a90a915cf82104c0f7ab86b6d4a36f72a61e1dee9bf67c4a200 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTY2OjJBNTlFQjozMjFENUE6NDI4NkMzOjZBRkJCOTc4IiwidmlzaXRvcl9pZCI6Ijg4ODY2NTczMTg1ODY2NjEyNDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a89e6cbe8d864bc71ae6d35a22745c4a9f8e5c944c5780e157a172ad10d3ff72 |
| hovercard-subject-tag | issue:3908154033 |
| 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/ExoQuery/ExoQuery/95/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6efea36e52690430ac6f5581f4b5775eff4a395aea721b339749826c713d2888/ExoQuery/ExoQuery/issues/95 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6efea36e52690430ac6f5581f4b5775eff4a395aea721b339749826c713d2888/ExoQuery/ExoQuery/issues/95 |
| og:image:alt | It is important to be able to place comments in SQL, sometimes used for: hints to the database settings documenting running queries for tracking by DBA's tracing Comments before/after SQL are very ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | apatrida |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2b2ef9c1578c18d8ed27027940544c958743213cf4461659f14d3ccdf51e162c |
| turbo-cache-control | no-preview |
| go-import | github.com/ExoQuery/ExoQuery git https://github.com/ExoQuery/ExoQuery.git |
| octolytics-dimension-user_id | 134092117 |
| octolytics-dimension-user_login | ExoQuery |
| octolytics-dimension-repository_id | 968484754 |
| octolytics-dimension-repository_nwo | ExoQuery/ExoQuery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 968484754 |
| octolytics-dimension-repository_network_root_nwo | ExoQuery/ExoQuery |
| 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 | e4cce0e99cf61481a318ff12c2e8580153a6c7c6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width