Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in SQL by (5k points)

Many relational databases handle a JDBC / SQL query in the following four steps:

  • They parse the incoming SQL query

  • Then Compile the SQL query

  • Plan/optimize the data acquisition path

  • And Execute the optimized query / acquire and return data

Please tell me what does parsing a query actually mean?

1 Answer

0 votes
by (10.2k points)

1. The meaning of parsing is to examine the character's input and recognize it as a statement or command by paying attention to the characters for keywords and identifiers, ignoring comments, arranging quoted portions as string constants, and matching the overall structure to the language syntax making sense of it all.

2. The meaning of plan optimization is to find out the best way to find the result, usually with respect to execution time. It also means the minimization of the number of locks needed. You can ignore some parts of the query (where ... and 1 == 1) or a table doesn't need to be accessed at all, etc.

If you want to get more insights into SQL, check out this SQL Course from Intellipaat.

Browse Categories

...