[{"data":1,"prerenderedAt":490},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fdatabase-explorer\u002Fquery-plans":3},{"id":4,"title":5,"body":6,"description":481,"extension":482,"meta":483,"navigation":484,"path":485,"redirect":486,"seo":487,"stem":488,"__hash__":489},"docs\u002Fdocs\u002Fdatabase-explorer\u002Fquery-plans.md","Query Plans",{"type":7,"value":8,"toc":461},"minimark",[9,13,17,22,38,42,62,66,102,112,116,119,125,185,188,202,205,208,278,281,285,290,293,313,319,323,329,332,337,360,366,370,373,378,381,395,399,404,410,414,423,427,430,434,437,441],[10,11,5],"h1",{"id":12},"query-plans",[14,15,16],"p",{},"Query Plans help you inspect how a database plans or executes a SQL statement.\nUse them when a query is slow, returns fewer rows than expected, or needs a\nquick check before you tune indexes or joins.",[18,19,21],"h2",{"id":20},"what-this-page-helps-you-do","What this page helps you do",[23,24,25,29,32,35],"ul",{},[26,27,28],"li",{},"Run a query plan from the SQL Console.",[26,30,31],{},"Compare operators in the Plan table.",[26,33,34],{},"Inspect useful details for the selected node.",[26,36,37],{},"Use Raw output when you need the exact database response.",[18,39,41],{"id":40},"prerequisites","Prerequisites",[23,43,44,47,50],{},[26,45,46],{},"Open Data Explorer.",[26,48,49],{},"Open a PostgreSQL, MySQL, or DuckDB-backed SQL Console tab.",[26,51,52,53,57,58,61],{},"Write a read query such as ",[54,55,56],"code",{},"SELECT ...",". Avoid running plan analysis on\nmutating statements unless you understand how your database handles\n",[54,59,60],{},"EXPLAIN ANALYZE",".",[18,63,65],{"id":64},"open-a-query-plan","Open a query plan",[67,68,69,77,80,87,90,96],"ol",{},[26,70,71,72,76],{},"Open the ",[73,74,75],"strong",{},"SQL Console"," for a supported connection.",[26,78,79],{},"Write the SQL statement you want to inspect.",[26,81,82,83,86],{},"Click ",[73,84,85],{},"Plan"," in the toolbar.",[26,88,89],{},"Wait for the results panel to open.",[26,91,92,93,95],{},"Use the ",[73,94,85],{}," tab for the compact plan view.",[26,97,92,98,101],{},[73,99,100],{},"Raw"," tab when you need the exact output returned by the database.",[14,103,104,105,108,109,111],{},"You can still write ",[54,106,107],{},"EXPLAIN"," manually. The ",[73,110,85],{}," button is the fastest path\nfor visual inspection because it asks the backend for a structured plan when the\ndatabase supports it.",[18,113,115],{"id":114},"plan-view","Plan view",[14,117,118],{},"The Plan tab is organized for comparison first:",[120,121],"themed-image",{"alt":122,"dark":123,"light":124},"PostgreSQL visual query plan with selected Index Scan details","\u002Fimages\u002Fdocs\u002Fdatabase-explorer\u002Fquery-plan-postgres-details-dark.png","\u002Fimages\u002Fdocs\u002Fdatabase-explorer\u002Fquery-plan-postgres-details-light.png",[126,127,128,141],"table",{},[129,130,131],"thead",{},[132,133,134,138],"tr",{},[135,136,137],"th",{},"Area",[135,139,140],{},"Use it for",[142,143,144,153,161,169,177],"tbody",{},[132,145,146,150],{},[147,148,149],"td",{},"Summary chips",[147,151,152],{},"Planning time, execution time, root operator, largest estimate gap, operator counts",[132,154,155,158],{},[147,156,157],{},"Search",[147,159,160],{},"Find operators, tables, indexes, conditions, or cache keys",[132,162,163,166],{},[147,164,165],{},"Signals only",[147,167,168],{},"Filter to rows with warnings or estimate gaps",[132,170,171,174],{},[147,172,173],{},"Operator table",[147,175,176],{},"Compare nodes by operator, table\u002Fentity, rows, cost\u002Fruntime, and warnings",[132,178,179,182],{},[147,180,181],{},"Details panel",[147,183,184],{},"Inspect fields that are specific to the selected node",[14,186,187],{},"Click a row in the operator table to update the details panel. Only one selected\nnode is shown at a time.",[14,189,190,191,194,195,198,199,201],{},"Warnings and signals are related but not the same. A fast query can show\n",[54,192,193],{},"Warnings 0"," and still have rows with estimate-gap signals such as\n",[54,196,197],{},"Overestimated x184",". Use ",[73,200,165],{}," to focus on those rows.",[18,203,181],{"id":204},"details-panel",[14,206,207],{},"The details panel does not repeat every raw field. It shows extra information\nthat is useful for the selected operator.",[126,209,210,220],{},[129,211,212],{},[132,213,214,217],{},[135,215,216],{},"Operator type",[135,218,219],{},"Details you may see",[142,221,222,230,238,246,254,262,270],{},[132,223,224,227],{},[147,225,226],{},"Scan",[147,228,229],{},"Relation, alias, index, key parts, ref, scan direction, filter, index condition",[132,231,232,235],{},[147,233,234],{},"Join",[147,236,237],{},"Join type, join condition, merge\u002Fhash condition, join filter, inner unique",[132,239,240,243],{},[147,241,242],{},"Memoize \u002F cache",[147,244,245],{},"Cache key, cache mode, hits, misses, peak memory",[132,247,248,251],{},[147,249,250],{},"Sort",[147,252,253],{},"Sort key, sort method, filesort\u002Ftemp table flags, sort memory",[132,255,256,259],{},[147,257,258],{},"Aggregate",[147,260,261],{},"Strategy, group key, output",[132,263,264,267],{},[147,265,266],{},"Limit",[147,268,269],{},"Limit-related rows when available",[132,271,272,275],{},[147,273,274],{},"Cost",[147,276,277],{},"PostgreSQL cost\u002Fwidth or MySQL cost fields",[14,279,280],{},"Empty, false, zero, or irrelevant fields are hidden unless the value itself is\nuseful.",[18,282,284],{"id":283},"postgresql-plans","PostgreSQL plans",[14,286,287,288,61],{},"For PostgreSQL, the visual Plan view uses JSON-format ",[54,289,107],{},[14,291,292],{},"When the plan is analyzed, the UI can show:",[23,294,295,298,301,304,307,310],{},[26,296,297],{},"planning and execution time;",[26,299,300],{},"estimated rows compared with actual rows;",[26,302,303],{},"loops;",[26,305,306],{},"node runtime;",[26,308,309],{},"estimate gaps;",[26,311,312],{},"scan, join, cache, sort, aggregate, condition, and cost details.",[14,314,315,316,318],{},"Use ",[73,317,100],{}," if you need the full PostgreSQL JSON output.",[18,320,322],{"id":321},"mysql-plans","MySQL plans",[14,324,325,326,61],{},"For regular MySQL plans, the visual Plan view uses ",[54,327,328],{},"EXPLAIN FORMAT=JSON",[14,330,331],{},"MySQL JSON plans do not include runtime loops, actual time, or actual rows. For\nthat reason, the MySQL plan table focuses on fields that are present and useful:",[120,333],{"alt":334,"dark":335,"light":336},"MySQL visual query plan table with selected REF scan details","\u002Fimages\u002Fdocs\u002Fdatabase-explorer\u002Fquery-plan-mysql-plan-dark.png","\u002Fimages\u002Fdocs\u002Fdatabase-explorer\u002Fquery-plan-mysql-plan-light.png",[23,338,339,342,345,348,351,354,357],{},[26,340,341],{},"table;",[26,343,344],{},"estimated rows;",[26,346,347],{},"index;",[26,349,350],{},"key parts;",[26,352,353],{},"ref;",[26,355,356],{},"cost;",[26,358,359],{},"warnings.",[14,361,362,363,365],{},"For MySQL ",[54,364,60],{},", MySQL returns TREE text. DBConvert Streams keeps\nthat output intact and parses enough structure to show a Plan view when\npossible.",[18,367,369],{"id":368},"raw-tab","Raw tab",[14,371,372],{},"The Raw tab is the source-of-truth view. It shows the database output without\ncustom interpretation.",[120,374],{"alt":375,"dark":376,"light":377},"MySQL raw JSON query plan output in the SQL Console","\u002Fimages\u002Fdocs\u002Fdatabase-explorer\u002Fquery-plan-mysql-raw-dark.png","\u002Fimages\u002Fdocs\u002Fdatabase-explorer\u002Fquery-plan-mysql-raw-light.png",[14,379,380],{},"Use Raw when you need to:",[23,382,383,389,392],{},[26,384,385,386,388],{},"copy the original ",[54,387,107],{}," result;",[26,390,391],{},"inspect a field that is not shown in the details panel;",[26,393,394],{},"compare DBConvert Streams output with a database CLI or another SQL tool.",[18,396,398],{"id":397},"troubleshooting","Troubleshooting",[400,401,403],"h3",{"id":402},"the-plan-button-reports-that-the-connection-is-not-supported","The Plan button reports that the connection is not supported",[14,405,406,407,409],{},"Visual plan mode is supported for PostgreSQL, MySQL\u002FMariaDB, and DuckDB-backed\ncontexts. For other engines, run the database's native ",[54,408,107],{}," manually if it\nis available.",[400,411,413],{"id":412},"the-mysql-table-has-no-time-or-loops-columns","The MySQL table has no time or loops columns",[14,415,416,417,419,420,422],{},"That is expected for ",[54,418,328],{},". MySQL does not return runtime loops\nor actual time in that format. Use ",[54,421,60],{}," when you need runtime\nexecution data.",[400,424,426],{"id":425},"the-plan-tab-is-less-detailed-than-raw","The Plan tab is less detailed than Raw",[14,428,429],{},"That is expected. Plan view is a readable summary and selected-node inspector.\nRaw remains the full database output.",[400,431,433],{"id":432},"signals-appear-on-a-fast-query","Signals appear on a fast query",[14,435,436],{},"Signals are not automatic tuning instructions. Check the row count, operator\ntype, and Raw output before changing SQL or indexes.",[18,438,440],{"id":439},"next-links","Next links",[23,442,443,449,455],{},[26,444,445],{},[446,447,75],"a",{"href":448},"\u002Fdocs\u002Fdatabase-explorer\u002Fsql-console",[26,450,451],{},[446,452,454],{"href":453},"\u002Fdocs\u002Fdatabase-explorer\u002Fviewing-data","Viewing Data",[26,456,457],{},[446,458,460],{"href":459},"\u002Fdocs\u002Fdatabase-explorer\u002Ffederated-queries","Federated Queries - User Guide",{"title":462,"searchDepth":463,"depth":463,"links":464},"",2,[465,466,467,468,469,470,471,472,473,480],{"id":20,"depth":463,"text":21},{"id":40,"depth":463,"text":41},{"id":64,"depth":463,"text":65},{"id":114,"depth":463,"text":115},{"id":204,"depth":463,"text":181},{"id":283,"depth":463,"text":284},{"id":321,"depth":463,"text":322},{"id":368,"depth":463,"text":369},{"id":397,"depth":463,"text":398,"children":474},[475,477,478,479],{"id":402,"depth":476,"text":403},3,{"id":412,"depth":476,"text":413},{"id":425,"depth":476,"text":426},{"id":432,"depth":476,"text":433},{"id":439,"depth":463,"text":440},"Inspect SQL execution plans in the DBConvert Streams SQL Console.","md",{},false,"\u002Fdocs\u002Fdatabase-explorer\u002Fquery-plans",null,{"title":5,"description":481},"docs\u002Fdatabase-explorer\u002Fquery-plans","ja456fG8RjPDz_iXowFQCa4PYChs2Dm1ObeNqtvXs7E",1782346473731]