What actually happens at the backend when we write a SQL query and execute it.
Is it similar like flow of C, C++ programs. I would like to understand the architecture of the database for the better understanding.
Can anybody help me out?
Printable View
What actually happens at the backend when we write a SQL query and execute it.
Is it similar like flow of C, C++ programs. I would like to understand the architecture of the database for the better understanding.
Can anybody help me out?
The processing logic for getting results or final output of your actual query is same as you do for regular programming language. But how it gets processed only differs. In programming language like C, C++ you have compilers checking syntax and taking care of usage semantics. In database you have optimizers like cost based optimizers which check the query written by users for analyzing statistics and uses the best path of execution.
Thanks!! for your very clear answer, but can u tell me what is this "best path" choosen. Is this similar to execution plan? what actually is this execution plan? can i know the stepwise/linewise output or execution result of my SQL written?
Please help by providing some useful links also if u can..
Thanks,
Neel.
[QUOTE=christia;13467]The processing logic for getting results or final output of your actual query is same as you do for regular programming language. But how it gets processed only differs. In programming language like C, C++ you have compilers checking syntax and taking care of usage semantics. In database you have optimizers like cost based optimizers which check the query written by users for analyzing statistics and uses the best path of execution.[/QUOTE]
use [B]tkprof [/B]utility tool to get details of execution plan.