Why Index?

  • Hi,

    The question which i am going to ask will prove that i how newbie i am.

    Basically indexes increases the performance will searching which is nullified while inserting . Now when the time required for inserting is large it means that the total turnaround time of the system which is develop is same.

  • Shadab Shah (8/30/2012)


    Hi,

    The question which i am going to ask will prove that i how newbie i am.

    Basically indexes increases the performance will searching which is nullified while inserting . Now when the time required for inserting is large it means that the total turnaround time of the system which is develop is same.

    Sorry but did not get the question here 🙁

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    🙂

  • Shadab Shah (8/30/2012)


    Hi,

    The question which i am going to ask will prove that i how newbie i am.

    Basically indexes increases the performance will searching which is nullified while inserting . Now when the time required for inserting is large it means that the total turnaround time of the system which is develop is same.

    What is your question ...

  • Shadab Shah (8/30/2012)


    Hi,

    Basically indexes increases the performance will searching which is nullified while inserting . Now when the time required for inserting is large it means that the total turnaround time of the system which is develop is same.

    Not really. Yes there is a certain overhead added to INSERTs and sometimes UPDATEs as they maintain the INDEXes. But the benefit gained on retrievals usually far outweighs that cost.

    Think of it this way. How often do you touch a record to update it? How often is that record retrieved, whether for viewing or reporting? I'd say the latter is much more frequent than the former.

    As long as you follow the advice in the second sentence of my signature line, INDEXes are frequently one of the best ways to improve system response and avoid things like blocking and deadlocks.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St

  • Shadab Shah (8/30/2012)


    Basically indexes increases the performance will searching which is nullified while inserting . Now when the time required for inserting is large it means that the total turnaround time of the system which is develop is same.

    It doesn't nullify it.

    An appropriate index could say turn a select statement from a minute to 100 ms (yes, that's very possible) and turn an insert from 50ms to 70ms maybe. (off the cuff figures, not researched numbers)

    Now, if you just put indexes anywhere without checking if they're needed, helpful and used, you'll kill insert performance and do nothing for select, update and delete.

    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 5 posts - 1 through 4 (of 4 total)

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