"mode": "execute" is the default. The engine parses, plans, optimizes, and then runs the query — fetching rows from DynamoDB and returning them in the response.
Consumes DynamoDB RCUs charged to your AWS account.
Required scope:query
Returns a data payload with rows, column metadata, and timing fields.
The optimizer’s relative cost estimate. Lower is cheaper. A weight of 0 means no cost estimate was computed — for example, when the query has no index candidates and the optimizer produces a simple scan plan.
{ "sql": "SELECT id, total FROM myschema.orders WHERE status = 'pending' LIMIT 10", "mode": "plan"}
Plan mode response:
{ "success": true, "data": { "plan": "Limit(10)\n Scan(myschema.orders)\n Filter(status = 'pending')", "weight": 0, "normalizedSql": "SELECT id, total FROM myschema.orders WHERE status = 'pending' LIMIT 10", "planTime": 3 }}
The plan tree shows the engine will perform a full Scan with a Filter applied — no index was matched. If you have a GSI on status, check that the schema metadata is registered correctly in the portal so the optimizer can see it.
If you see Scan(...) in the plan for a query that should use an index, run the query in plan mode first and inspect the tree before paying DynamoDB RCU costs for a scan.
Execute mode request (same query):
{ "sql": "SELECT id, total FROM myschema.orders WHERE status = 'pending' LIMIT 10", "mode": "execute"}
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"DynamoSQL","colors":{"primary":"#FF9900","light":"#FFB84D","dark":"#CC7A00"},"favicon":"https://mintcdn.com/jmrapidapps/zPacbr5tPJpZGVDx/public/logo/favicon.svg?fit=max\u0026auto=format\u0026n=zPacbr5tPJpZGVDx\u0026q=85\u0026s=174d2799d2c7fea0cca12c504852eb82","logo":{"light":"https://mintcdn.com/jmrapidapps/zPacbr5tPJpZGVDx/public/logo/light.svg?fit=max\u0026auto=format\u0026n=zPacbr5tPJpZGVDx\u0026q=85\u0026s=b0b5e003ebd8596309d1d3c65f1766b2","dark":"https://mintcdn.com/jmrapidapps/zPacbr5tPJpZGVDx/public/logo/dark.svg?fit=max\u0026auto=format\u0026n=zPacbr5tPJpZGVDx\u0026q=85\u0026s=edbec3c5e90a09e52d9fb90ed5ebed42","href":"https://dynamosql.com"},"api":{"openapi":"openapi.yaml","mdx":{"server":"https://api.dynamosql.com"}},"navbar":{"links":[{"label":"Postman Collection","href":"/guides/postman"}],"primary":null},"footer":{"socials":{"github":"https://github.com/dynamosql"}},"integrations":{"posthog":{"apiKey":"phc_AbHH4xBEuoGEcrzBotzsBK3KUbXXaMc9WyPdSjg7soPf"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"jmrapidapps","hasAudioNarration":false,"actualSubdomain":"jmrapidapps","customDomains":["docs.dynamosql.com"],"gitSource":{"type":"github","owner":"jmrapidapps","repo":"dynamosql-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21ec174469870420d777be","collectionId":"b13809aa-716c-4dcc-bf02-a17b49ccbb8c","schemaVersion":"v2"},"entitlements":{},"buildId":"6a21ec174469870420d777be:success","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API Reference","count":12},{"language":"default","tag":"SQL Reference","count":10},{"language":"default","tag":"Schemas","count":7},{"language":"default","tag":"Guides","count":6},{"language":"default","tag":"MCP Server","count":4},{"language":"default","tag":"Authentication","count":3},{"language":"default","tag":"Get Started","count":3},{"language":"default","tag":"Changelog","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"guides/query-modes","slug":"/guides/query-modes","pageMetadata":{"title":"Query Modes","description":"Understand the difference between execute and plan mode.","href":"/guides/query-modes"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Understand the difference between execute and plan mode.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Every request to `,_jsx(_components.code,{children:`POST /v1/query`}),` runs in one of two modes, controlled by the `,_jsx(_components.code,{children:`mode`}),` field in the request body.`]}),`\n`,_jsx(Heading,{level:`2`,id:`execute-mode`,children:`Execute Mode`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"mode\": \"execute\"`}),` is the default. The engine parses, plans, optimizes, and then runs the query — fetching rows from DynamoDB and returning them in the response.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Consumes DynamoDB RCUs`}),` charged to your AWS account.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Required scope:`}),` `,_jsx(_components.code,{children:`query`})]}),`\n`,_jsxs(_components.li,{children:[`Returns a `,_jsx(_components.code,{children:`data`}),` payload with rows, column metadata, and timing fields.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`plan-mode`,children:`Plan Mode`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"mode\": \"plan\"`}),` parses and optimizes the query without fetching any data.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Does NOT consume DynamoDB RCUs.`})}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Required scope:`}),` `,_jsx(_components.code,{children:`query`})]}),`\n`,_jsx(_components.li,{children:`Returns a human-readable plan tree, an optimizer weight (cost estimate), and the normalized SQL string.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Plan mode is useful for:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Debugging slow queries`}),` — check whether the optimizer selected an index or fell back to a scan.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Validating SQL in CI/CD`}),` — catch syntax errors and unsupported features without consuming capacity.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Previewing query structure`}),` — understand how the engine will execute a query before running it against production tables.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`understanding-the-response-fields`,children:`Understanding the Response Fields`}),`\n`,_jsx(Heading,{level:`3`,id:`weight`,children:_jsx(_components.code,{children:`weight`})}),`\n`,_jsxs(_components.p,{children:[`The optimizer’s relative cost estimate. Lower is cheaper. A weight of `,_jsx(_components.code,{children:`0`}),` means no cost estimate was computed — for example, when the query has no index candidates and the optimizer produces a simple scan plan.`]}),`\n`,_jsx(Heading,{level:`3`,id:`plantime`,children:_jsx(_components.code,{children:`planTime`})}),`\n`,_jsxs(_components.p,{children:[`Present in both modes. Covers parse + plan + optimize only. It does `,_jsx(_components.strong,{children:`not`}),` include any DynamoDB I/O.`]}),`\n`,_jsx(Heading,{level:`3`,id:`exectime`,children:_jsx(_components.code,{children:`execTime`})}),`\n`,_jsxs(_components.p,{children:[`Present in execute mode only. Total elapsed time from request receipt to response, including all DynamoDB I/O. Always `,_jsx(_components.code,{children:`>= planTime`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Plan mode request:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sql\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SELECT id, total FROM myschema.orders WHERE status = 'pending' LIMIT 10\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"plan\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Plan mode response:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"plan\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Limit(10)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Scan(myschema.orders)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Filter(status = 'pending')\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"weight\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"normalizedSql\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SELECT id, total FROM myschema.orders WHERE status = 'pending' LIMIT 10\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"planTime\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The plan tree shows the engine will perform a full `,_jsx(_components.code,{children:`Scan`}),` with a `,_jsx(_components.code,{children:`Filter`}),` applied — no index was matched. If you have a GSI on `,_jsx(_components.code,{children:`status`}),`, check that the schema metadata is registered correctly in the portal so the optimizer can see it.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`If you see `,_jsx(_components.code,{children:`Scan(...)`}),` in the plan for a query that should use an index, run the query in plan mode first and inspect the tree before paying DynamoDB RCU costs for a scan.`]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Execute mode request (same query):`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sql\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SELECT id, total FROM myschema.orders WHERE status = 'pending' LIMIT 10\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"execute\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Execute mode response:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"columns\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"total\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ord-001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`59.99`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ord-002\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`120.00`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"firstRowIdx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"planTime\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"execTime\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`47`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Query Modes","description":"Understand the difference between execute and plan mode.","href":"/guides/query-modes"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Execute Mode","slug":"execute-mode","depth":2,"children":[]},{"title":"Plan Mode","slug":"plan-mode","depth":2,"children":[]},{"title":"Understanding the Response Fields","slug":"understanding-the-response-fields","depth":2,"children":[{"title":"weight","slug":"weight","depth":3,"children":[]},{"title":"planTime","slug":"plantime","depth":3,"children":[]},{"title":"execTime","slug":"exectime","depth":3,"children":[]}]},{"title":"Example","slug":"example","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"jmrapidapps","siteName":"DynamoSQL","title":"Query Modes - DynamoSQL","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-13T22:48:10.682Z","originalFileLocation":"guides/query-modes.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Understand the difference between execute and plan mode.\">\u003cmeta data-mint-head name=\"application-name\" content=\"DynamoSQL\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/jmrapidapps/W3kttRsvcCgl31Iw/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/jmrapidapps/W3kttRsvcCgl31Iw/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/jmrapidapps/W3kttRsvcCgl31Iw/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/jmrapidapps/W3kttRsvcCgl31Iw/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/jmrapidapps/W3kttRsvcCgl31Iw/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/jmrapidapps/W3kttRsvcCgl31Iw/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/jmrapidapps/W3kttRsvcCgl31Iw/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/jmrapidapps/W3kttRsvcCgl31Iw/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/jmrapidapps/W3kttRsvcCgl31Iw/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Query Modes - DynamoSQL\">\u003cmeta data-mint-head property=\"og:description\" content=\"Understand the difference between execute and plan mode.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"DynamoSQL\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.dynamosql.com/guides/query-modes\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://jmrapidapps.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Query+Modes\u0026amp;description=Understand+the+difference+between+execute+and+plan+mode.\u0026amp;theme=e55e953bcc4617de573a62ae\u0026amp;signature=de26d41c953349ce4ab8e07765b46495a08151321295eab05f6b6324c2a59f6a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Query Modes - DynamoSQL\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Understand the difference between execute and plan mode.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://jmrapidapps.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Query+Modes\u0026amp;description=Understand+the+difference+between+execute+and+plan+mode.\u0026amp;theme=e55e953bcc4617de573a62ae\u0026amp;signature=de26d41c953349ce4ab8e07765b46495a08151321295eab05f6b6324c2a59f6a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/jmrapidapps/W3kttRsvcCgl31Iw/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"DynamoSQL\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF9900\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.dynamosql.com/guides/query-modes\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/query-modes.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.dynamosql.com/#organization\",\"name\":\"DynamoSQL\",\"url\":\"https://docs.dynamosql.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/jmrapidapps/zPacbr5tPJpZGVDx/public/logo/light.svg?fit=max\u0026auto=format\u0026n=zPacbr5tPJpZGVDx\u0026q=85\u0026s=b0b5e003ebd8596309d1d3c65f1766b2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.dynamosql.com#website\",\"name\":\"DynamoSQL\",\"url\":\"https://docs.dynamosql.com\",\"publisher\":{\"@id\":\"https://docs.dynamosql.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.dynamosql.com/guides/query-modes#webpage\",\"url\":\"https://docs.dynamosql.com/guides/query-modes\",\"name\":\"Query Modes\",\"description\":\"Understand the difference between execute and plan mode.\",\"dateModified\":\"2026-03-13T22:48:10.682Z\",\"isPartOf\":{\"@id\":\"https://docs.dynamosql.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.dynamosql.com/guides/query-modes#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.dynamosql.com/guides/query-modes#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"DynamoSQL\",\"item\":\"https://docs.dynamosql.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Query Modes\",\"item\":\"https://docs.dynamosql.com/guides/query-modes\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.dynamosql.com/guides/query-modes#article\",\"headline\":\"Query Modes\",\"name\":\"Query Modes\",\"description\":\"Understand the difference between execute and plan mode.\",\"url\":\"https://docs.dynamosql.com/guides/query-modes\",\"mainEntityOfPage\":{\"@id\":\"https://docs.dynamosql.com/guides/query-modes#webpage\"},\"dateModified\":\"2026-03-13T22:48:10.682Z\",\"publisher\":{\"@id\":\"https://docs.dynamosql.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.dynamosql.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"DynamoSQL\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"DynamoSQL","nav":{"global":null,"groups":[{"group":"Get Started","pages":[{"title":"Quickstart","href":"/guides/quickstart"},{"title":"Authentication","href":"/guides/authentication"},{"title":"IAM Setup","description":"Grant DynamoSQL read access to your DynamoDB tables by creating a schema in the portal.","href":"/guides/iam-setup"}]},{"group":"Guides","pages":[{"title":"Query Modes","href":"/guides/query-modes"},{"title":"Response Formats","description":"Choose between row arrays and key-value objects.","href":"/guides/response-formats"},{"title":"Pagination","href":"/guides/pagination"},{"title":"Error Handling","href":"/guides/error-handling"},{"title":"Rate Limits and Quotas","href":"/guides/rate-limits-and-quotas"},{"title":"Postman Collection","href":"/guides/postman"}]},{"group":"MCP Server","pages":[{"title":"Overview","href":"/mcp/overview"},{"title":"MCP Quickstart","href":"/mcp/quickstart"},{"title":"MCP Authentication","href":"/mcp/authentication"},{"title":"Tools and Resources","href":"/mcp/tools-and-resources"}]},{"group":"API Reference","pages":[{"group":"Authentication","pages":[{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Get Access Token","openapi":"POST /v1/auth/token","href":"/api-reference/authentication/get-token"},{"title":"Refresh Access Token","openapi":"POST /v1/auth/refresh","href":"/api-reference/authentication/refresh-token"}]},{"title":"Query","openapi":"POST /v1/query","href":"/api-reference/query"},{"group":"Schemas","pages":[{"title":"List Schemas","openapi":"GET /v1/schemas","href":"/api-reference/schemas/list"},{"title":"Create Schema","openapi":"POST /v1/schemas","href":"/api-reference/schemas/create"},{"title":"Get Schema","openapi":"GET /v1/schemas/{schemaName}","href":"/api-reference/schemas/get"},{"title":"Update Schema","openapi":"PATCH /v1/schemas/{schemaName}","href":"/api-reference/schemas/update"},{"title":"Delete Schema","openapi":"DELETE /v1/schemas/{schemaName}","href":"/api-reference/schemas/delete"},{"title":"Refresh Metadata","openapi":"POST /v1/schemas/{schemaName}/refresh-metadata","href":"/api-reference/schemas/refresh-metadata"},{"title":"Validate Role","openapi":"POST /v1/schemas/{schemaName}/validate-role","href":"/api-reference/schemas/validate-role"}]},{"title":"Usage Summary","openapi":"GET /v1/usage/summary","href":"/api-reference/usage"}]},{"group":"SQL Reference","pages":[{"title":"SQL Reference Overview","href":"/sql-reference/overview"},{"title":"SELECT","href":"/sql-reference/select"},{"title":"FROM and JOINs","href":"/sql-reference/from-and-joins"},{"title":"WHERE Predicates","href":"/sql-reference/where-predicates"},{"title":"Grouping and Aggregation","href":"/sql-reference/grouping-and-aggregation"},{"title":"Subqueries and CTEs","href":"/sql-reference/subqueries-and-ctes"},{"title":"Set Operations","href":"/sql-reference/set-operations"},{"title":"Expressions and Operators","href":"/sql-reference/expressions-and-operators"},{"title":"Functions","href":"/sql-reference/functions"},{"title":"Limitations","href":"/sql-reference/limitations"}]},{"group":"Changelog","pages":[{"title":"2026 Changelog","href":"/changelog/2026"}]}]},"basePath":"","title":"Query Modes - DynamoSQL","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}