> We are using Ingres Linux Version II 3.0.2.
> I was asked to optimize some queries that where using views. The queries
[quoted text clipped - 8 lines]
> queries. In this way I do not get a good statistic. What is happening here
> and what can I do about it?
>> We are using Ingres Linux Version II 3.0.2.
>> I was asked to optimize some queries that where using views. The queries
[quoted text clipped - 12 lines]
> your problem description, like (for starters) the view definition, your
> alternative query, and the table descriptions.
It was also a problem with internal memory.
It are (were) fairly complicated views. View 1 was on table a, view 2 was a
join on table a and b. And the query was a join on view 1 and 2. I defined
simpler views. View 1 is now on table a and view 2 only on table b. And the
query is a join on view 1 and 2. The speed improvement is between 300 and
1100. So that is not bad. ;-}
So in principle problem solved. I think there was a problem with the join on
the join.
> Are you invalidating the DMF cache between tests? You need to do that to
> ensure a fair and reliable comparison. To invalidate the cache (posting
> any modified pages first) SET TRACE POINT DM421 immediately before every
> test.
When I try to do this, I get 'You do not have permission to set trace
flags'. How do I get this permission? I am not a regular Ingres user. I was
just asked to solve this problem.
> My guess is that your first very fast (sub-second) query just used data
> cached by a previous attempt, so your expectations are now excessively
> high.
First the improvement when running the query another time was only on the
new queries, but with more memory I also see a speed improvement in the old
query. But when the fifth time that the old query executes, it still takes
more as 300 seconds and the first new query is finished in less then a
quarter of a second, I still think you can say that the new query is a lot
more efficient. :-D