Re: index in use when any SQL access it...
Posted in 2012
Executing more tests, I found the reason...
The index, is opened when is executed a "prepare" of one SQL over the table.
Is a simple SQL, what filter 2 fields and one of them is part of the
this index.
When this prepare is executed , five indexes are put "in use" (the table
have 10 indexes)
So, if I'm right is the optimizer...
On 25/4/2012 10:53, Cesar Inacio Martins wrote:
> Hi,
>
> ifx 11.50 FC9X6 , AIX 6.1
>
>
> I'm looking about use of indexes on some tables.
> The mainly objective is check if this indexes still needed and who use it.
>
> Then I using the commands bellow (in my own scripts) to try reach my
> objective:
> onstat -g opn
> onstat -t
> onstat -g ppf>
>
> The situation what I found:
> - With "onstat -g ppf" I identify one index have low use .
> so I'm trying indentify who use it and what SQL is.
> - With "onstat -t" I see few users accessing it.
> - With "onstat -g opn" (looking for the partnum of the idx) I get the
> sessions id and track the application.
> - I not found at the application code any SQL what justify the access
> over this indexes.
>
> Trying identify what SQL access this indexes I simulate the situation
> successfully at our test environment.
> Over this test environment, to try track what SQL is, I execute :
> - Activate SQL TRACE over my user
> - Activate explain dynamically (onmode -Y) at the session.
> - Then I run the application
> - At onstat -g opn and onstat -t , the index show the status of "in
> use" for my session
> - At the sql trace and explain, there is no reference for it. :(
>
> So, Why they is showed "in use" ?????
>
> My suspect is over the optimizer, when probably they check what index
> use and just keep it "opened" ....
> could be this ?
>
> Regards
> Cesar
>
>
>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list