Subject | Re: how to retrieve the indexed reads and non indexed reads statistics |
---|---|
Author | svanderclock |
Post date | 2009-12-28T19:07:28Z |
Thanks ann,
but do you know how to use the MON$ table? any doc somewhere or sample to retrieve the indexed reads vs the non indexed reads ?
about the filter, the rules is an idea, the probleme is that it will take time, time and time to create/debug/maintain it !
for exemple i see that if i have a index on (LocationID, beds)
and if i do the query
select * from property where locationid='xxx' and beds >= 1 and beds <= 2 order by locationsid, beds
then it's crazy but usind the index locationid, beds (like plan property order index_locationsid_beds) is very slow !! in the oposite way using plan property order index_locationsid_beds index (index beds) is fast !!
i must find a system that will learm by himself with plan to use, like every human do ... by guessing first and trying and trying again
but do you know how to use the MON$ table? any doc somewhere or sample to retrieve the indexed reads vs the non indexed reads ?
about the filter, the rules is an idea, the probleme is that it will take time, time and time to create/debug/maintain it !
for exemple i see that if i have a index on (LocationID, beds)
and if i do the query
select * from property where locationid='xxx' and beds >= 1 and beds <= 2 order by locationsid, beds
then it's crazy but usind the index locationid, beds (like plan property order index_locationsid_beds) is very slow !! in the oposite way using plan property order index_locationsid_beds index (index beds) is fast !!
i must find a system that will learm by himself with plan to use, like every human do ... by guessing first and trying and trying again
--- In firebird-support@yahoogroups.com, "Ann W. Harrison" <aharrison@...> wrote:
>
> svanderclock wrote:
> >
> > someone already told me but i can not found it anymore:
> > after i do a select, how to retrieve the indexed reads and non indexed reads statistics ? like ibexpert or ems firebird manager do
> >
>
> I think those are available from the MON$ pseudo-tables.
>
> Thinking about what Arno said, you might get better results if
> you used some rules about the queries you generate. For example
> if the user specifies beds > 1, don't generate a criteria for
> beds; instead, filter the results yourself.
>
> For what it's worth, PostgreSQL does use histograms to monitor
> the distribution of values in an index.
> Good luck,
>
> Ann
>