in reply to Re^5: Increase a value inside MySQL query using perl
in thread Increase a value inside MySQL query using perl

Does a DB wih ROWIDs serve the records in ROWID-sequence?

That is a SQL question, not a database question. Databases store data, and order can be very important. SQL is used to retrieve data (via the SQL engine in the RDBMS), and displays it in no specific order, unless told do so.

But anyway, does ROWID affect retrieval? IIUC, it most certainly does. The table (assuming an index is not used in the query) points to the first data block, which most likely contains the first record, and chains from there. A database that did otherwise would likely be inefficient.

  • Comment on Re^6: Increase a value inside MySQL query using perl

Replies are listed 'Best First'.
Re^7: Increase a value inside MySQL query using perl
by CountZero (Bishop) on Oct 15, 2015 at 21:48 UTC
    A database that did otherwise would likely be inefficient.
    And there lies the root of all database evil. Such a close connection between the data and the storage goes against all principles of SQL. And the way SQL is implemented is already a weakened form of what it should have been.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics