Different output of 'order by' on the similar table of Production and Development DB
Hi,
We have this query:
SELECT DATE_FLD, ROWNUM AS DAYNO FROM DIM_DATE WHERE DATE_FLD < TRUNC(TO_DATE('2015-07-14','YYYY-MM-DD HH24:MI:SS')) ORDER BY DATE_FLD DESC;
On our development DB the result is
DATE_FLD, DAYNO
13-JUL-15 | 1 |
12-JUL-15 | 2 |
11-JUL-15 | 3 |
But on on production, the DAYNO is in descending order:
DATE_FLD, DAYNO
13-JUL-15 | 924 |
12-JUL-15 | 923 |
11-JUL-15 | 922 |
the dev table is an exact copy of prod with same index definition, both dev and prod behaves the same before (dayno is in ascending order).
What could've caused the difference? The only thing we can remember doing on prod is rebuilding the index.