Re: [firebird-support] Why the difference?

2013-03-01 Thread W O
Hello Mark Thank you for your answer. So, the clause ORDER BY should be used just when the table has few rows? Because if do not use the indexes does not make sense to use it with big tables. Greetings. Walter. On Fri, Mar 1, 2013 at 8:41 AM, Mark Rotteveel wrote: > ** > > > On Fri, 1 M

Re: [firebird-support] Why the difference?

2013-03-01 Thread Mark Rotteveel
On Fri, 1 Mar 2013 08:32:09 -0400, W O wrote: > But the strange thing is that PER_IDENTI is the Primary Key and ORDER BY > seems not use it. As Firebird is retrieving all rows anyway, there is - AFAIK - no benefit to use the primary key index for the ORDER BY. Unlike some other databases, Firebir

Re: [firebird-support] Why the difference?

2013-03-01 Thread W O
Hello Mateusz But PER_IDENTI is the Primary Key, why Firebird needs a two-pass proccess? Greetings. Walter. On Fri, Mar 1, 2013 at 5:51 AM, Mateusz Loskot wrote: > ** > > > On 1 March 2013 04:37, W O sistemas2000profesio...@gmail.com> wrote: > > Somebody knows why there are a difference s

Re: [firebird-support] Why the difference?

2013-03-01 Thread W O
Hello Mark Thank for your answer. But the strange thing is that PER_IDENTI is the Primary Key and ORDER BY seems not use it. Greetings. Walter. On Fri, Mar 1, 2013 at 4:18 AM, Mark Rotteveel wrote: > ** > > > On Fri, 1 Mar 2013 00:37:26 -0400, W O sistemas2000profesio...@gmail.com> >

Re: [firebird-support] Why the difference?

2013-03-01 Thread Mateusz Loskot
On 1 March 2013 04:37, W O wrote: > 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

Re: [firebird-support] Why the difference?

2013-03-01 Thread Mark Rotteveel
On Fri, 1 Mar 2013 00:37:26 -0400, W O wrote: > 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: >

[firebird-support] Why the difference?

2013-02-28 Thread 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