Subject | Re: Limiting fetched rows doesn't offer much performance benefit |
---|---|
Author | jimbehr3446 |
Post date | 2006-03-07T19:21:42Z |
--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@...> wrote:
only a few. As you point out, the index is not needed when a large
percentage of the records have FLAG="Y". But when there are only a
few it saves searching sequentially for that one-in-a-million record.
<Ivan.Prenosil@...> wrote:
>to the index
> Since you use only one field in WHERE clause, adding another field
> can't speed up SELECT statement. Your problem is that eitherthe index should help),
> - there are really too much 'Y' values in FALG field (thus dropping
>Sometimes there are millions of records with FLAG="Y" and sometimes
only a few. As you point out, the index is not needed when a large
percentage of the records have FLAG="Y". But when there are only a
few it saves searching sequentially for that one-in-a-million record.
>be (FLAG, PK), not (PK, FLAG)
> or
> - you have incorrect order of fields in index' definition, it must
>I wish it were that easy. We have (FLAG, PK) :-(