Subject | Re: [firebird-support] index to improve selectivity |
---|---|
Author | Karsten Rolfs |
Post date | 2011-02-18T14:42:09Z |
Hi,
1) doesn't matter. But if you want a sorting or even select the first x records above 0 you should use ascending
2) a key will help but there shouldn't be any measurable difference if ascending or descending
Karsten
1) doesn't matter. But if you want a sorting or even select the first x records above 0 you should use ascending
2) a key will help but there shouldn't be any measurable difference if ascending or descending
Karsten
On 18.02.2011 14:40, Sergio H. Gonzalez wrote:
>
> Hello... simple questions (I think!):
>
> 1) having a numeric field, if I want to select all the values > 0, is
> better to have an descending index on that field? or just a ascending one?
>
> 2) having a date field, if I want to select all the records with null.
> It helps to have an index on that field? If so, would it be ascending or
> descending?
>
> I know, FB uses the index for selecting nulls of a date field (the plan
> analizer shows me that) but I wander if it really helps.
>
> thanks!
>
> -s
>
> [Non-text portions of this message have been removed]
>
>
[Non-text portions of this message have been removed]