You must Sign In to post a response.
  • Category: SQL Server

    Interview question on Database

    Hi,

    Recently I attended an interview call for .net developer position. I answered most of the questions.
    But Interviewer asked me 2 database related questions and I am not able to convince him.

    Can you give me proper explanation of below questions:

    1. Explain different database optimization techniques with proper example?
    2. During select queries we use locks for tables. So definitely it degrade the performance. So is there any other method available instead of locking table?


    Thanks,
    Ashish Mayekar
  • #756283
    Hi,

    Kindly take a look up the following mentioned Link for Locking the Sql Tables. It may help u..

    1.http://www.sqlteam.com/article/introduction-to-locking-in-sql-server

    For Database Optimization,

    1.http://www.codeproject.com/Articles/34372/Top-steps-to-optimize-data-access-in-SQL-Server

  • #756285
    Hi Ashish Mayekar,

    Please refer below links to get answer for your questions:

    1. Database Optimization:

    http://www.codeproject.com/Articles/34372/Top-steps-to-optimize-data-access-in-SQL-Server

    http://www.toptal.com/sql/sql-database-tuning-for-developers



    2. locks for tables:

    http://stackoverflow.com/questions/12608780/understanding-sql-server-locks-on-select-queries

    https://ask.sqlservercentral.com/questions/32529/can-a-select-hold-an-exclusive-lock-on-a-table.html

    http://dba.stackexchange.com/questions/40987/does-a-simple-select-query-acquire-locks

    Hope it will be helpful to you.

    Thanks,
    Ram Prasad

  • #756324
    Hi,
    Thank you for your reply.

    But still I am confuse regarding Locks as documents are not clear.
    Optimization techniques : what I found is Indexing only.

    Is there any rules for optimization while writing Stored procedure , function or cursors??

    Thanks.
    Ashish Mayekar


  • Sign In to post your comments