Subject Why the difference?
Author W O
Somebody knows why there are a difference so big?

I have a table with 3.600.000 rows more or less.

Writing:
SELECT * FROM V_ABM_PERSONAS V WHERE V.PER_IDENTI > 0 ROWS 1 TO 100

takes 2.656 seconds (less than 3 seconds)

Writing:
SELECT * FROM V_ABM_PERSONAS V ORDER BY V.PER_IDENTI ROWS 1 TO 100

takes more than 11 minutes!!!! (bored, I did cancel the execution)

The column PER_IDENTI is the Primary Key.

Why that? Why a difference so big? Somebody knows the answer?

Windows 7, Firebird 2.5.1, SuperServer

Thanks in advance.

Walter.


[Non-text portions of this message have been removed]