Query Store Hints Preview

Published 06-09-2021 05:55 AM 3,321 Views
Microsoft

Today we are announcing the public preview of the Query Store hints feature which provides an easy-to-use method for shaping query plans and behavior without changing application code.  This feature will first be available in Azure SQL Database – including in Azure SQL single databases, elastic pools, SQL Managed Instance and Hyperscale service tier databases.

 

Query Hints

 

Ideally the Query Optimizer selects an optimal execution plan for every query in your workload.  If this doesn’t happen, a developer or DBA may choose to manually optimize for specific conditions using query hints.

 

Specified via the OPTION clause, query hints can be used to influence query execution behavior.  For example, the following query sets the max degree of parallelism to “1”:

 

SELECT COUNT(DISTINCT [WWI Order ID])
FROM [Fact].[OrderHistoryExtended]
OPTION (MAXDOP 1);

 

Applying query hints to statements requires a rewrite of the original query text.  DBAs often cannot make changes directly to the T-SQL code or may not be able to immediately make the desired changes.

 

DBAs can turn to plan guides for this scenario, but the SQL team has heard the feedback that plan guides are oftentimes too complex to use.

 

Introducing Query Store hints

 

Query Store hints provide a simple method for shaping query plans without changing the original code.

 

query_store_hints_blog_6.PNG

 

To use Query Store hints, do the following:

 

Step 1: Identify the Query Store query_id of the statement you wish to modify.  In the following example we use the Query Store catalog views to find the query_id for a query given a specific query text string:

 

SELECT query_sql_text, q.query_id
FROM sys.query_store_query_text qt
INNER JOIN sys.query_store_query q ON
qt.query_text_id = q.query_text_id
WHERE query_sql_text like N'%ORDER BY ListingPrice DESC%' and query_sql_text not like N'%query_store%';
GO

 

Note: You can also find a query_id from SQL Server Management Studio Query Store reports or through Query Performance Insight in the portal.

 

Step 2: Execute sp_query_store_set_hints with the query_id and query hint string you wish to apply to the query.  This query hint string can contain one or more query hints:

 

EXEC sp_query_store_set_hints 3, N'OPTION(RECOMPILE)';
GO

 

You can use the same procedure to modify existing hints and you can track all created hints in the new sys.query_store_query_hints catalog view.  

 

SELECT query_hint_id, query_id, query_hint_text, last_query_hint_failure_reason,
last_query_hint_failure_reason_desc, query_hint_failure_count, source, source_desc
FROM sys.query_store_query_hints;

query_store_hints_blog_5.PNG

 

To remove hints, use the sp_query_store_clear_hints procedure:

 

EXEC sp_query_store_clear_hints @query_id = 3;
GO

 

The documentation link (https://aka.ms/querystorehintsdocs) goes into more details on Query Store hints, but a few key points to get you started for the first version of this feature:

  • Query Store hints support statement-level hints.
  • Query Store hints are persisted and survive restarts and failovers.
  • Query Store hints override any existing hard-coded statement level hints and plan guide hints.
  • If hints contradict what is possible, we will not block query execution and the Query Store hint will not be applied.

 

Learning more about Query Store hints

 

Query Store hints provide a short-term, easy-to-apply fix you can use when you cannot directly or immediately change the text of the query.  Many of the common query hints customers use today are enabled in the public preview of Query Store hints.  Example use-cases:

  • Recompile a query on each execution
  • Cap the memory grant size for a bulk operation
  • Limit maximum degree of parallelism 
  • Disable "row goal" for a TOP query
  • Use a different join algorithm 
  • Use a lower database compatibility level
  • Use the legacy cardinality estimator

To learn more details about Query Store hints, see the full documentation at https://aka.ms/querystorehintsdocs

 

Have feedback?  During public preview, you can email QSHintsFeedback@microsoft.com. Or if you prefer, log your feedback in the SQL Database User Voice forum.

 

 

 

1 Comment
Occasional Visitor

1. suppose I have a stored proc or parameterized sql that is executed frequently - that I do not want a recompile every time. Suppose parameters include @StartDate , @EndDate

If start - end dates is 1 or 2 days, then I want one plan, but a different plan for multi-day inputs. The first situation should use a precompiled plan for narrow date range. The second could have a precompiled plan for wide range or get a recompile because its going to be an expensive query anyways and compile is no big deal.

2. Complex query with unavoidable propagating row estimate deviation. Could there be a hint to evaluate the small tables (having a SARG specified) to estimate the rows in the big tables, and base the plan optimization on that? One option, I write a query with a series of CTE's, and have a hint to actual evaluate the rows in one or more CTE's to optimize the plan for the final query?

3. Intelligent query processing is great, but plans derived from a cost model based on disk IO (random vs. sequential) is very different from when data is in memory. It is time to change the execution plan cost model

%3CLINGO-SUB%20id%3D%22lingo-sub-2424378%22%20slang%3D%22en-US%22%3EQuery%20Store%20Hints%20Preview%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2424378%22%20slang%3D%22en-US%22%3E%3CP%3EToday%20we%20are%20announcing%20the%20public%20preview%20of%20the%20%3CSTRONG%3EQuery%20Store%20hints%3C%2FSTRONG%3E%20feature%20which%20provides%20an%20easy-to-use%20method%20for%20shaping%20query%20plans%20and%20behavior%20%3CEM%3Ewithout%20changing%20application%20code%3C%2FEM%3E.%26nbsp%3B%20This%20feature%20will%20first%20be%20available%20in%20Azure%20SQL%20Database%20%E2%80%93%20including%20in%20Azure%20SQL%20single%20databases%2C%20elastic%20pools%2C%20SQL%20Managed%20Instance%20and%20Hyperscale%20service%20tier%20databases.%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId-1356652439%22%20id%3D%22toc-hId-1356652439%22%20id%3D%22toc-hId-1356652439%22%20id%3D%22toc-hId-1355845423%22%3E%26nbsp%3B%3C%2FH1%3E%0A%3CH1%20id%3D%22toc-hId--450802024%22%20id%3D%22toc-hId--450802024%22%20id%3D%22toc-hId--450802024%22%20id%3D%22toc-hId--451609040%22%3EQuery%20Hints%3C%2FH1%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIdeally%20the%20Query%20Optimizer%20selects%20an%20optimal%20execution%20plan%20for%20every%20query%20in%20your%20workload.%26nbsp%3B%20If%20this%20doesn%E2%80%99t%20happen%2C%20a%20developer%20or%20DBA%20may%20choose%20to%20manually%20optimize%20for%20specific%20conditions%20using%20query%20hints.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESpecified%20via%20the%20OPTION%20clause%2C%20query%20hints%20can%20be%20used%20to%20influence%20query%20execution%20behavior.%26nbsp%3B%20For%20example%2C%20the%20following%20query%20sets%20the%20max%20degree%20of%20parallelism%20to%20%E2%80%9C1%E2%80%9D%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ESELECT%20COUNT(DISTINCT%20%5BWWI%20Order%20ID%5D)%3CBR%20%2F%3EFROM%20%5BFact%5D.%5BOrderHistoryExtended%5D%3CBR%20%2F%3EOPTION%20(MAXDOP%201)%3B%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EApplying%20query%20hints%20to%20statements%20requires%20a%20rewrite%20of%20the%20original%20query%20text.%26nbsp%3B%20DBAs%20often%20cannot%20make%20changes%20directly%20to%20the%20T-SQL%20code%20or%20may%20not%20be%20able%20to%20%3CEM%3Eimmediately%3C%2FEM%3E%20make%20the%20desired%20changes.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDBAs%20can%20turn%20to%20plan%20guides%20for%20this%20scenario%2C%20but%20the%20SQL%20team%20has%20heard%20the%20feedback%20that%20plan%20guides%20are%20oftentimes%20too%20complex%20to%20use.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId-2036710809%22%20id%3D%22toc-hId-2036710809%22%20id%3D%22toc-hId-2036710809%22%20id%3D%22toc-hId-2035903793%22%3EIntroducing%20Query%20Store%20hints%3C%2FH1%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EQuery%20Store%20hints%20provide%20a%20simple%20method%20for%20shaping%20query%20plans%20without%20changing%20the%20original%20code.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22query_store_hints_blog_6.PNG%22%20style%3D%22width%3A%20800px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287065i3F3369FD9CA398E0%2Fimage-dimensions%2F800x110%3Fv%3Dv2%22%20width%3D%22800%22%20height%3D%22110%22%20role%3D%22button%22%20title%3D%22query_store_hints_blog_6.PNG%22%20alt%3D%22query_store_hints_blog_6.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20use%20Query%20Store%20hints%2C%20do%20the%20following%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%201%3A%3C%2FSTRONG%3E%20Identify%20the%20Query%20Store%20query_id%20of%20the%20statement%20you%20wish%20to%20modify.%26nbsp%3B%20In%20the%20following%20example%20we%20use%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fsystem-catalog-views%2Fquery-store-catalog-views-transact-sql%3Fview%3Dsql-server-ver15%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EQuery%20Store%20catalog%20views%3C%2FA%3E%20to%20find%20the%20query_id%20for%20a%20query%20given%20a%20specific%20query%20text%20string%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ESELECT%20query_sql_text%2C%20q.query_id%3CBR%20%2F%3EFROM%20sys.query_store_query_text%20qt%20%3CBR%20%2F%3EINNER%20JOIN%20sys.query_store_query%20q%20ON%20%3CBR%20%2F%3Eqt.query_text_id%20%3D%20q.query_text_id%20%3CBR%20%2F%3EWHERE%20query_sql_text%20like%20N'%25ORDER%20BY%20ListingPrice%20DESC%25'%20and%20query_sql_text%20not%20like%20N'%25query_store%25'%3B%3CBR%20%2F%3EGO%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20border%3D%221%22%20width%3D%22100%25%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22100%25%22%3ENote%3A%20You%20can%20also%20find%20a%20query_id%20from%20SQL%20Server%20Management%20Studio%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fperformance%2Fmonitoring-performance-by-using-the-query-store%3Fview%3Dsql-server-ver15%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EQuery%20Store%20reports%3C%2FA%3E%20or%20through%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-sql%2Fdatabase%2Fquery-performance-insight-use%23view-individual-query-details%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EQuery%20Performance%20Insight%3C%2FA%3E%20in%20the%20portal.%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%202%3A%3C%2FSTRONG%3E%20Execute%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fsystem-stored-procedures%2Fsys-sp-query-store-set-hints-transact-sql%3Fview%3Dazuresqldb-current%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Esp_query_store_set_hints%3C%2FA%3E%20with%20the%20query_id%20and%20query%20hint%20string%20you%20wish%20to%20apply%20to%20the%20query.%26nbsp%3B%20This%20query%20hint%20string%20can%20contain%20one%20or%20more%20query%20hints%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EEXEC%20sp_query_store_set_hints%203%2C%20N'OPTION(RECOMPILE)'%3B%3CBR%20%2F%3EGO%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20use%20the%20same%20procedure%20to%20modify%20%3CEM%3Eexisting%3C%2FEM%3E%20hints%20and%20you%20can%20track%20all%20created%20hints%20in%20the%20new%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fsystem-catalog-views%2Fsys-query-store-query-hints-transact-sql%3Fview%3Dazuresqldb-current%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Esys.query_store_query_hints%3C%2FA%3E%20catalog%20view.%20%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ESELECT%20query_hint_id%2C%20query_id%2C%20query_hint_text%2C%20last_query_hint_failure_reason%2C%3CBR%20%2F%3E%20%20%20%20%20%20%20last_query_hint_failure_reason_desc%2C%20query_hint_failure_count%2C%20source%2C%20source_desc%3CBR%20%2F%3EFROM%20sys.query_store_query_hints%3B%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22query_store_hints_blog_5.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287064i2BA1101840C3092E%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22query_store_hints_blog_5.PNG%22%20alt%3D%22query_store_hints_blog_5.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20remove%20hints%2C%20use%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fsystem-stored-procedures%2Fsys-sp-query-store-clear-hints-transact-sql%3Fview%3Dazuresqldb-current%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Esp_query_store_clear_hints%3C%2FA%3E%20procedure%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EEXEC%20sp_query_store_clear_hints%20%40query_id%20%3D%203%3B%3CBR%20%2F%3EGO%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fquerystorehintsdocs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Edocumentation%20link%3C%2FA%3E%20(%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fquerystorehintsdocs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Faka.ms%2Fquerystorehintsdocs%3C%2FA%3E)%20goes%20into%20more%20details%20on%20Query%20Store%20hints%2C%20but%20a%20few%20key%20points%20to%20get%20you%20started%20for%20the%20first%20version%20of%20this%20feature%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EQuery%20Store%20hints%20support%20statement-level%20hints.%3C%2FLI%3E%0A%3CLI%3EQuery%20Store%20hints%20are%20persisted%20and%20survive%20restarts%20and%20failovers.%3C%2FLI%3E%0A%3CLI%3EQuery%20Store%20hints%20override%20any%20existing%20hard-coded%20statement%20level%20hints%20and%20plan%20guide%20hints.%3C%2FLI%3E%0A%3CLI%3EIf%20hints%20contradict%20what%20is%20possible%2C%20we%20will%20%3CEM%3Enot%20%3C%2FEM%3Eblock%20query%20execution%20and%20the%20Query%20Store%20hint%20will%20%3CEM%3Enot%20%3C%2FEM%3Ebe%20applied.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId-229256346%22%20id%3D%22toc-hId-229256346%22%20id%3D%22toc-hId-229256346%22%20id%3D%22toc-hId-228449330%22%3ELearning%20more%20about%20Query%20Store%20hints%3C%2FH1%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EQuery%20Store%20hints%20provide%20a%20short-term%2C%20easy-to-apply%20fix%20you%20can%20use%20when%20you%20cannot%20directly%20or%20immediately%20change%20the%20text%20of%20the%20query.%26nbsp%3B%20Many%20of%20the%20common%20query%20hints%20customers%20use%20today%20are%20enabled%20in%20the%20public%20preview%20of%20Query%20Store%20hints.%26nbsp%3B%20Example%20use-cases%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERecompile%20a%20query%20on%20each%20execution%3C%2FLI%3E%0A%3CLI%3ECap%20the%20memory%20grant%20size%20for%20a%20bulk%20operation%3C%2FLI%3E%0A%3CLI%3ELimit%20maximum%20degree%20of%20parallelism%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EDisable%20%22row%20goal%22%20for%20a%20TOP%20query%3C%2FLI%3E%0A%3CLI%3EUse%20a%20different%20join%20algorithm%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EUse%20a%20lower%20database%20compatibility%20level%3C%2FLI%3E%0A%3CLI%3EUse%20the%20legacy%20cardinality%20estimator%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ETo%20learn%20more%20details%20about%20Query%20Store%20hints%2C%20see%20the%20full%20documentation%20at%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fquerystorehintsdocs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Faka.ms%2Fquerystorehintsdocs%3C%2FA%3E.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHave%20feedback%3F%26nbsp%3B%3C%2FSTRONG%3E%20During%20public%20preview%2C%20you%20can%20email%26nbsp%3B%3CA%20href%3D%22mailto%3AQSHintsFeedback%40microsoft.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EQSHintsFeedback%40microsoft.com%3C%2FA%3E.%20Or%20if%20you%20prefer%2C%20log%20your%20feedback%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Ffeedback.azure.com%2Fforums%2F217321-sql-database%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3ESQL%20Database%20User%20Voice%3C%2FA%3E%20forum.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2424378%22%20slang%3D%22en-US%22%3E%3CP%3ENow%20in%20public%20preview%20in%20Azure%20SQL%20Database%20and%20SQL%20Managed%20Instance%2C%20the%20Query%20Store%20hints%20feature%20provides%20you%20with%20an%20easy-to-use%20method%20for%20shaping%20query%20plans%20without%20changing%20application%20code.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2424378%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20SQL%20Database%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20SQL%20Managed%20Instance%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2430985%22%20slang%3D%22en-US%22%3ERe%3A%20Query%20Store%20Hints%20Preview%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2430985%22%20slang%3D%22en-US%22%3E%3CP%3E1.%20suppose%20I%20have%20a%20stored%20proc%20or%20parameterized%20sql%20that%20is%20executed%20frequently%20-%20that%20I%20do%20not%20want%20a%20recompile%20every%20time.%20Suppose%20parameters%20include%26nbsp%3B%40StartDate%20%2C%20%40EndDate%3C%2FP%3E%3CP%3EIf%20start%20-%20end%20dates%20is%201%20or%202%20days%2C%20then%20I%20want%20one%20plan%2C%20but%20a%20different%20plan%20for%20multi-day%20inputs.%20The%20first%20situation%20should%20use%20a%20precompiled%20plan%20for%20narrow%20date%20range.%20The%20second%20could%20have%20a%20precompiled%20plan%20for%20wide%20range%20or%20get%20a%20recompile%20because%20its%20going%20to%20be%20an%20expensive%20query%20anyways%20and%20compile%20is%20no%20big%20deal.%3C%2FP%3E%3CP%3E2.%20Complex%20query%20with%20unavoidable%20propagating%20row%20estimate%20deviation.%20Could%20there%20be%20a%20hint%20to%20evaluate%20the%20small%20tables%20(having%20a%20SARG%20specified)%20to%20estimate%20the%20rows%20in%20the%20big%20tables%2C%20and%20base%20the%20plan%20optimization%20on%20that%3F%20One%20option%2C%20I%20write%20a%20query%20with%20a%20series%20of%20CTE's%2C%20and%20have%20a%20hint%20to%20actual%20evaluate%20the%20rows%20in%20one%20or%20more%20CTE's%20to%20optimize%20the%20plan%20for%20the%20final%20query%3F%3C%2FP%3E%3CP%3E3.%20Intelligent%20query%20processing%20is%20great%2C%20but%20plans%20derived%20from%20a%20cost%20model%20based%20on%20disk%20IO%20(random%20vs.%20sequential)%20is%20very%20different%20from%20when%20data%20is%20in%20memory.%20It%20is%20time%20to%20change%20the%20execution%20plan%20cost%20model%3C%2FP%3E%3C%2FLINGO-BODY%3E
Co-Authors
Version history
Last update:
‎Jun 09 2021 05:52 AM
Updated by: