DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Data in different Order

Hybrid View

  1. #1
    Join Date
    Mar 2004
    Location
    India
    Posts
    72

    Data in different Order

    Hi,

    I have Three environments, Test, Development and Production.

    We are using the same production backup to refresh the Test, Dev database.

    And trying to select from one table without order by clause,

    Select * from table_a;

    Test and Production are giving data with same order, but in Development its in different order. Only Primary key is there and no other index are there with this table. Everything looks similar for this table in all the environments.

    Is there any specific reason that retrives data in different order.

    Thanks

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    you can only guarantee order by using the order by clause

    data isnt stored in order so the database will return it in any way it sees fit

  3. #3
    Join Date
    Mar 2004
    Location
    India
    Posts
    72
    Thanks..

    Primary key will not make any difference? I believe that the primary key will re-arrange the data in physical storage based on the key values. Is that wrong?

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    no, its just a primary key, has nothing to do with storage

    heap tables have no order, its why they are called heaps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width