πŸ“’ Too many exams? Don’t know which one suits you best? Book Your Free Expert πŸ‘‰ call Now!

  • google app store apple app store
  • βœ–

      Question

      What is 'query optimization' in

      DBMS?
      A Rewriting SQL queries to use simpler syntax which are fast in execution Correct Answer Incorrect Answer
      B The process by which the database engine automatically selects the most efficient execution plan for a query to minimize response time and resource usage Correct Answer Incorrect Answer
      C Manually adding indexes to all database columns so that accessing data becomes fast Correct Answer Incorrect Answer
      D Splitting large queries into multiple smaller queries so that the execution becomes faster and efficient Correct Answer Incorrect Answer
      E Converting SQL queries to stored procedures for faster execution Correct Answer Incorrect Answer

      Solution

      The Query Optimizer (part of the DBMS) analyzes multiple possible execution plans for a given SQL query and selects the one with the lowest estimated cost (I/O, CPU, memory). It considers available indexes, table statistics, join algorithms (nested loop, hash join, merge join), and cardinality estimates. Developers can influence optimization by creating appropriate indexes, updating statistics, rewriting queries, and using execution plan analysis tools (EXPLAIN in MySQL/PostgreSQL).

      Practice Next

      Relevant for Exams:

      ask-question