Why are there different results when narrowing the columns and fetching only the first row?
You don't have a suggestion order by
for any query, so the ordering of the result set is undefined. You can even run the same query twice and get different results.
There are many reasons why the result sets will not be in the same order. Most likely you have an index on mrpcolumn
. This index spans the second query, so the query can use the index to get one row.
The first will go to the data files.
Another reason could be execution in a parallel environment where it is undefined which thread / process returns the first value.
When using sentences, fetch first
you should usually use order by
.
source to share