Subject | Re: [firebird-support] when an index is needed ? |
---|---|
Author | Vander Clock Stephane |
Post date | 2012-01-31T19:04:45Z |
yes i understand ...
what i want to say, after how many "page fetch" it's become better to
have an index ?
for exemple i want all the article order by date from the database.
the database have 1000 articles ...
is it really usefull to have right now to have an index on the price ? i
thing no ...
now the database have 100000 articles
is it really usefull to have right now to have an index on the price ? i
thing yes ...
my test show if more than 1000 reccord it's start to be better to use
index ...
want to share your opinion ...
what i want to say, after how many "page fetch" it's become better to
have an index ?
for exemple i want all the article order by date from the database.
the database have 1000 articles ...
is it really usefull to have right now to have an index on the price ? i
thing no ...
now the database have 100000 articles
is it really usefull to have right now to have an index on the price ? i
thing yes ...
my test show if more than 1000 reccord it's start to be better to use
index ...
want to share your opinion ...
On 1/31/2012 1:07 AM, Leyne, Sean wrote:
>
>
> > From with amount of record in a table it's start to be usefull to
> have an index
> > ?
> > 100? 1000? 10000 ?
> >
> > Actually i thing about 200 ? maybe 1000 ?
>
> Adding an index is not about the number of rows/records, it is about
> the "uniqueness" of the index.
>
> Consider, A table with every person in the world:
>
> - it should not have an index for sex.
> - it also not have an index for Country (China + India = 25% of database)
> - A compound index by country, last name, date of birth would be of
> some value.
>
>
> You want to build few indexes that help narrow down the scope of the
> search.
>
> Remember that the engine will need to read each candidate row to check
> the current search field values against the query critertia.
>
> In some cases, indexes actually slow things down by causing a large
> number of random disk IOs. A non-indexed SQL is not always a bad thing.
>
>
> Sean
>
>
[Non-text portions of this message have been removed]