Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: How are ROWS affected by backup or index?



Permlink Replies: 2 - Last Post: Aug 26, 2017 9:19 AM Last Post By: Joe Sansalone
Joe Sansalone

Posts: 158
Registered: 1/15/06
How are ROWS affected by backup or index?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 25, 2017 3:02 PM
Hi,

I'm using the ROWS keyword in a Select statement in order to get chunks of rows at
a time. And, I'd like to leverage this functionality ... but I need to know if it will be consistent.
Of course, I expect that Deletes will change it.

If I were to backup and restore, would the same ROWS x to y produce the same result?

Does re-indexing change it?

Thanks,
Joe

Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: How are ROWS affected by backup or index?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 25, 2017 9:04 PM   in response to: Joe Sansalone in response to: Joe Sansalone
Joe Sansalone wrote:
Hi,

I'm using the ROWS keyword in a Select statement in order to get chunks of rows at
a time. And, I'd like to leverage this functionality ... but I need to know if it will be consistent.
Of course, I expect that Deletes will change it.

If I were to backup and restore, would the same ROWS x to y produce the same result?

Does re-indexing change it?

Thanks,
Joe


If you want to same results set you must always put an order by. Otherwise
InterBase (or any SQL backend for that matter) may return the data in whatever
order IB likes. Usually this will be natural order as things are read of the
disk a data page at a time. After a B/R cycle I would expect this to be different.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Joe Sansalone

Posts: 158
Registered: 1/15/06
Re: How are ROWS affected by backup or index?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 26, 2017 9:19 AM   in response to: Jeff Overcash (... in response to: Jeff Overcash (...
You're right .. order by so that it must return same results.
Thanks

Jeff Overcash (TeamB) wrote:
Joe Sansalone wrote:
Hi,

I'm using the ROWS keyword in a Select statement in order to get chunks of rows at
a time. And, I'd like to leverage this functionality ... but I need to know if it will be consistent.
Of course, I expect that Deletes will change it.

If I were to backup and restore, would the same ROWS x to y produce the same result?

Does re-indexing change it?

Thanks,
Joe


If you want to same results set you must always put an order by. Otherwise
InterBase (or any SQL backend for that matter) may return the data in whatever
order IB likes. Usually this will be natural order as things are read of the
disk a data page at a time. After a B/R cycle I would expect this to be different.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02