How to clear SQL Server DBA interview?

Поделиться
HTML-код
  • Опубликовано: 3 авг 2024
  • What companies are looking while hiring experienced DBA?
    1.Experienced in common DBA operations like backup, setting up users, installation and upgradation, etc.
    2.Experience in Always ON
    3.Experience in disaster recovery
    4.Good knowledge in SSIS
    5. Performance optimization
    First we try to find expensive queries as 99% of performance issues are because of bad queries.
    Once we know bad queries we try to find expensive operators into them, like:
    First Lazy spool: Lazy spool is most expensive operator among all, which happens because of duplicate aggregation. We can remove duplicate aggregation by temporary tables, cte, etc.
    Second Hash match: which is always because of unsorted data. Which means either missing index or indexes are not properly utilized, which can be because of :
    1. function use in join or where condition
    2. First column of existing index is not part of where clause or join
    We can address this by adding new index, fixing query to utilize existing index or altering index to new filter configurations.
    Keylookup: Keylookup just indicate, that index is missing some data. We can easily resolve it by adding missing column to index key or include part. But there is a catch as, we don't have privilege to alter index all the time. So, some times, we cannot avoid keylookup.
    Index Suggestion:
    Index key columns are the one which are part of where clause or joins.
    Index include columns are the one which are part of only selection.
    Partition Elimination: we check if partition are getting eliminated in query or not. As sometimes even tables have partitions still query go for scan instead partition elimination.
    A lot of times, I have seen, developer use different datatype in storedprocedure parameters which don't match to actual column. And end up in no partition elimination.
    Two reasons why query is not eliminating partition:
    1. Data type mismatch or function used on where clause or type casting
    2. Partition key column is not part of where clause
    BAD Views: Views sometimes becomes bad when developer don't alter them instead they join same table to view which is already part of view to get some extra data. Instead they should write new view or alter existing view to get extra columns
    Minimizing sub queries: We can minimize sub queries, if subquries belong to same table to get different column using cross apply or outer apply.
    Example we have to get most recent orderdate, order amount, order shipped date, etc for each customer. So instead of writing different sub query for each column, we can use cross apply or outer apply to get data in single query.

Комментарии • 54

  • @RussianVideoPodcast
    @RussianVideoPodcast 3 года назад +2

    Excellent explanation! The best I have ever heard. Please release more videos. Your way of explaining is very effective.

  • @pavan634
    @pavan634 4 года назад

    Greatly explained and excellent summarization of query optimization

  • @ankammaraobattula253
    @ankammaraobattula253 2 года назад

    The way of telling the things so effective. Thanks for a great session.

  • @akul210
    @akul210 3 года назад

    These are really a unique details compare to other query performance videos ! Thank you so much Yogesh. Looking forward for some more query optimization n Tuning videos ! Keep it up.

  • @bhadresh135
    @bhadresh135 4 года назад +1

    Useful information provided in this video.
    Thanks a lot!! Keep posting such a knowledgeable video

  • @polajyothi
    @polajyothi Год назад

    Very well explained. Thanks for your efforts. Expecting more videos in advanced topics.

  • @surbhidwivedi6006
    @surbhidwivedi6006 4 года назад

    Very helpful and easily explained such a tough topic .. good work🙂

    • @techsapphire
      @techsapphire  4 года назад

      Glad you liked it, I provide consultation too. If needed, feel free to ask.

  • @anubhabdash305
    @anubhabdash305 3 года назад

    Excellent details, helped a lot !!! Ty

  • @jennidarl
    @jennidarl 3 года назад +3

    This was really useful in simple words, I could replicate same words in my interview. Thanks a lot. Expecting more interview scenario videos like this.

  • @amitroy-cx2qb
    @amitroy-cx2qb 2 года назад

    This is an excellent document. Thanks.

  • @dbamentorparag
    @dbamentorparag 4 года назад +1

    Thanks for your time

  • @coolguy1dinu
    @coolguy1dinu 2 года назад

    Indeed, excellent content Video... looking forward some Azure videos as well from you :) :) ...

  • @hindimusic5532
    @hindimusic5532 2 года назад

    Thanks for this video...I want more vedios for dba ...

  • @santoshkumarkar39
    @santoshkumarkar39 3 года назад

    Excellent...

  • @avneeshsaini7823
    @avneeshsaini7823 4 года назад +1

    It's quite good content.

  • @MaheshKumar-jy9hp
    @MaheshKumar-jy9hp Год назад

    I like this type of example, I really appreciate.

  • @sateeshbabu1003
    @sateeshbabu1003 2 года назад

    Great👏👏👏👏

  • @avneeshsaini7823
    @avneeshsaini7823 4 года назад +1

    Can you help with more interview question asked from basic to advanced?

    • @techsapphire
      @techsapphire  4 года назад

      For basic to advance complex queries check ruclips.net/video/-t-8-xoLyv4/видео.html

  • @abhishekkumar-sl8ow
    @abhishekkumar-sl8ow 3 года назад

    Hi Sir, I want to learn more about DBA work . Do you have any training program for this?

  • @komalbhos1974
    @komalbhos1974 3 года назад +1

    Sir I want to learn SQL server DBA from basic to high can you help me

    • @techsapphire
      @techsapphire  3 года назад

      You are fresher or working DBA? You can reach me on yogesh.mehla@gmail.com

  • @novamaster9335
    @novamaster9335 4 года назад

    Cover more topics

    • @techsapphire
      @techsapphire  4 года назад

      Please check this video, it covers all topics covered in detail: ruclips.net/video/t2R0-xcKw44/видео.html

  • @vadaparthiprudhvi5422
    @vadaparthiprudhvi5422 3 года назад

    Hi I am entering into new project I require help on preparing a Knowledge Transfer (KT) required for SQL Server Support Transition like wt do ask questions to clients

  • @harshavardanrajendran6978
    @harshavardanrajendran6978 2 года назад

    Video quality please make much better

  • @SQL100K-rb4xw
    @SQL100K-rb4xw 5 месяцев назад

    Where r the scripts ?

  • @rajeevtiwari9838
    @rajeevtiwari9838 2 года назад

    Can you please provide me the soft copy of this interview questions

    • @techsapphire
      @techsapphire  2 года назад

      share your email for document or mail me at yogesh.mehla@gmai.com

  • @janardhanreddytanubuddi217
    @janardhanreddytanubuddi217 4 года назад

    May I get this document...?

    • @techsapphire
      @techsapphire  4 года назад +1

      You can download script from www.techsapphire.net/SQLServerDBAInterview%20script.docx
      You can learn performance tuning:
      ruclips.net/video/t2R0-xcKw44/видео.html
      ruclips.net/video/r2SRt2ZDdhA/видео.html

  • @Mr_Singh12
    @Mr_Singh12 3 года назад

    My question is "How will we identify the bad queries ?"

    • @techsapphire
      @techsapphire  3 года назад

      For that watch ruclips.net/video/r2SRt2ZDdhA/видео.html