Query architecture

  • Hi All,

    If we run a query (it can be select, insert or update), what is the architecture for that query ?

    What happens at background ?

    Thanks And Regards!!

    Thank You.

    Regards,
    Raghavender Chavva

  • First, this question could require an extremely verbous answer. It would help if we could understand better what you are actually looking for from this question.

  • I have faced this question in an interview.

    let me explain it.....

    if we fire a query from QA or any other apllication against a database, first of all where it goes and what it does to give us output..

    internally what it will do ?

    Thank You.

    Regards,
    Raghavender Chavva

  • May I suggest that you try checking out BOL? It may cover this particular topic, I haven't checked myself as I have never been asked this question myself in an interview.

  • Something like this it does.

    1.It parses the query...checks for the syntax/semantics...checks for existance of tables/views...permissions of users etc.

    2.Creates the execution plan, if none exists in the buffer, if exists uses the same.(Indexes/stats)

    3.Executes the query.

    4.Fetches the data from the buffer/disk etc

    5.Throws the ouput to the user.

    Hope this helps.

    Pavan.

  • http://msdn.microsoft.com/en-us/library/cc280362.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply