Subject | RE: [firebird-support] Re: 'select' with delays ref/eDN5012844953 |
---|---|
Author | Dennis |
Post date | 2007-01-22T13:01:39Z |
Hello Hellen
Yes I have a descending index, I think I have mentioned it, it is external
index (it is not included in the all key fields).
Let me ask you this:
Suppose that we have the key fields key1, key2, and key3
And I want order by 4th field the key0 descending.
Is the follow index structure correct?
Index key1, key2, key3 asc
Index key0 desc
What about this? (I think that doesn't cover our problem)
Index key0, key1, key2, key3 desc
All keys in the same index descending putting the key0 first
Regards
Dennis
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: Saturday, January 20, 2007 12:34 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Re: 'select' with delays ref/eDN5012844953
At 08:04 PM 20/01/2007, you wrote:
Do you understand that, if you create an index, it is by default
ASCending? An ascending index cannot help to speed up a descending sort!
You can have both an ascending and a descending index on the same
column. The optimizer will choose the correct one for the sort if
you specify the sort as DESC.
./heLen
[Non-text portions of this message have been removed]
Yes I have a descending index, I think I have mentioned it, it is external
index (it is not included in the all key fields).
Let me ask you this:
Suppose that we have the key fields key1, key2, and key3
And I want order by 4th field the key0 descending.
Is the follow index structure correct?
Index key1, key2, key3 asc
Index key0 desc
What about this? (I think that doesn't cover our problem)
Index key0, key1, key2, key3 desc
All keys in the same index descending putting the key0 first
Regards
Dennis
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: Saturday, January 20, 2007 12:34 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Re: 'select' with delays ref/eDN5012844953
At 08:04 PM 20/01/2007, you wrote:
>Hello Adamstatement
>After these backups and restores the database has the half size and it is
>much faster, 3-4 the initial query. The delay is restricted in the
>'order by issue_date desc'. This produces this delay, from user's interfaceDo you have a descending index on issue_date?
>I made this descent order optional, so if the user wants descent he will
>wait some seconds.
>
>Unfortunately didn't manage to reduce this delay.
Do you understand that, if you create an index, it is by default
ASCending? An ascending index cannot help to speed up a descending sort!
You can have both an ascending and a descending index on the same
column. The optimizer will choose the correct one for the sort if
you specify the sort as DESC.
./heLen
[Non-text portions of this message have been removed]