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
  1. Home
  2. Database & SysAdmin
  3. Database
  4. clustering index

clustering index

Scheduled Pinned Locked Moved Database
database
6 Posts 2 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.
  • A Offline
    A Offline
    Amr Mohammad
    wrote on last edited by
    #1

    A clustering index is an ordered file with two fields; the first field is of the same type as the clustering field of the data file, and the second field is a disk block pointer. There is one entry in the clustering index for each distinct value of the clustering field, and it contains the value and a pointer to the first block in the data file that has a record with that value for its clustering field. Could any one explain to me how the clustering index have one entry for each distinct value of the clustering field While these below link to an illustrations image show a pointer to the same value 1 in the same block http://imagizer.imageshack.us/a/img538/3491/AdYgxd.png[^]

    P 2 Replies Last reply
    0
    • A Amr Mohammad

      A clustering index is an ordered file with two fields; the first field is of the same type as the clustering field of the data file, and the second field is a disk block pointer. There is one entry in the clustering index for each distinct value of the clustering field, and it contains the value and a pointer to the first block in the data file that has a record with that value for its clustering field. Could any one explain to me how the clustering index have one entry for each distinct value of the clustering field While these below link to an illustrations image show a pointer to the same value 1 in the same block http://imagizer.imageshack.us/a/img538/3491/AdYgxd.png[^]

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      Read the quote a few more times; it matches the diagram. Try reversing the arrows and see if that helps you understand it.

      A 1 Reply Last reply
      0
      • P PIEBALDconsult

        Read the quote a few more times; it matches the diagram. Try reversing the arrows and see if that helps you understand it.

        A Offline
        A Offline
        Amr Mohammad
        wrote on last edited by
        #3

        I have read it many times but I cannot understand it. One entry for each distinct value while the are 2 pointers each of which pointing to the clustering field 1 in the same block file. I tried to reverse the arrows but the same issue 2 pointers 1, and 2 to the same clustering field in the same clustering file as you can see while other pointers point to a distinct values in each clustering block.

        P 1 Reply Last reply
        0
        • A Amr Mohammad

          I have read it many times but I cannot understand it. One entry for each distinct value while the are 2 pointers each of which pointing to the clustering field 1 in the same block file. I tried to reverse the arrows but the same issue 2 pointers 1, and 2 to the same clustering field in the same clustering file as you can see while other pointers point to a distinct values in each clustering block.

          P Offline
          P Offline
          PIEBALDconsult
          wrote on last edited by
          #4

          Hmmm, actually it looks like the diagram is slightly confusing. The two arrows to block 1 should both be pointing to the start of block 1.

          1 Reply Last reply
          0
          • A Amr Mohammad

            A clustering index is an ordered file with two fields; the first field is of the same type as the clustering field of the data file, and the second field is a disk block pointer. There is one entry in the clustering index for each distinct value of the clustering field, and it contains the value and a pointer to the first block in the data file that has a record with that value for its clustering field. Could any one explain to me how the clustering index have one entry for each distinct value of the clustering field While these below link to an illustrations image show a pointer to the same value 1 in the same block http://imagizer.imageshack.us/a/img538/3491/AdYgxd.png[^]

            P Offline
            P Offline
            PIEBALDconsult
            wrote on last edited by
            #5

            How about this: The records with Dept_number==1 start in block 0 The records with Dept_number==2 start in block 0 The records with Dept_number==3 start in block 1 The records with Dept_number==4 start in block 2 The records with Dept_number==5 start in block 3 The records with Dept_number==6 start in block 4 The records with Dept_number==8 start in block 5

            A 1 Reply Last reply
            0
            • P PIEBALDconsult

              How about this: The records with Dept_number==1 start in block 0 The records with Dept_number==2 start in block 0 The records with Dept_number==3 start in block 1 The records with Dept_number==4 start in block 2 The records with Dept_number==5 start in block 3 The records with Dept_number==6 start in block 4 The records with Dept_number==8 start in block 5

              A Offline
              A Offline
              Amr Mohammad
              wrote on last edited by
              #6

              This could be intended :). With this a pointer to the first block in the data file that has a record with that value for its clustering field This seems reasonable

              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