正在加载图片...
Viewing Query Evaluation Plans Most database support explain <query> Displays plan chosen by query optimizer,along with cost estimates Some syntax variations between databases Oracle:explain plan for <query>followed by select*from table (dbms_xplan.display) SQL Server:set showplan_text on Some databases(e.g.PostgreSQL)support explain analyse <query> Shows actual runtime statistics found by running the query,in addition to showing the plan Some databases(e.g.PostgreSQL)show cost as f./ f is the cost of delivering first tuple and is cost of delivering all results Database System Concepts-7th Edition 16.6 ©Silberscha乜,Korth and SudarshanDatabase System Concepts - 7 16.6 ©Silberschatz, Korth and Sudarshan th Edition Viewing Query Evaluation Plans ▪ Most database support explain <query> • Displays plan chosen by query optimizer, along with cost estimates • Some syntax variations between databases ▪ Oracle: explain plan for <query> followed by select * from table (dbms_xplan.display) ▪ SQL Server: set showplan_text on ▪ Some databases (e.g. PostgreSQL) support explain analyse <query> • Shows actual runtime statistics found by running the query, in addition to showing the plan ▪ Some databases (e.g. PostgreSQL) show cost as f..l • f is the cost of delivering first tuple and l is cost of delivering all results
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有