Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. In sql server, Indexing is faster in which datatype comparatively?

In sql server, Indexing is faster in which datatype comparatively?

Scheduled Pinned Locked Moved Database
databasesql-serversysadminalgorithmsquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Suave_Shiva
    wrote on last edited by
    #1

    :) Hi Frds, If we are using Indexing concept for searching criteria, which datatype will b faster, can you please tell me the order(Int,Date & String)??? Thank U............. Urs Suave Shiva :laugh:

    G A 2 Replies Last reply
    0
    • S Suave_Shiva

      :) Hi Frds, If we are using Indexing concept for searching criteria, which datatype will b faster, can you please tell me the order(Int,Date & String)??? Thank U............. Urs Suave Shiva :laugh:

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      Int will be faster because it's easy to do comparison operations on it. Varchar and Date are less effective because it is not easy to perform mathematical operations on them and comparison operations take longer.

      Giorgi Dalakishvili #region signature my articles #endregion

      1 Reply Last reply
      0
      • S Suave_Shiva

        :) Hi Frds, If we are using Indexing concept for searching criteria, which datatype will b faster, can you please tell me the order(Int,Date & String)??? Thank U............. Urs Suave Shiva :laugh:

        A Offline
        A Offline
        Ashfield
        wrote on last edited by
        #3

        Int is the fastest, I think date would be next fastest as its stored as an int, then string, but its more important to get the index(es) right than worry about which datatypes are fastest - its only in the case of very large tables that you will notice any significant difference.

        Bob Ashfield Consultants Ltd

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups