Statistics question Ingres II 2.5

Statistics question Ingres II 2.5

Post by Mich » Wed, 20 Mar 2002 23:37:20



Hello,

We have a Sun machine with Ingres II 2.5.

We have a problem with the statistics. When we are running a query
with statistics (optimzedb -zk) the query is slower then without the
statistics. Is this a bug in Ingres. Has someone had the same problem
and how did you deal with it?

Thanks.

Kind Regards,

Michel

 
 
 

Statistics question Ingres II 2.5

Post by Martin Bow » Thu, 21 Mar 2002 07:30:10


Hi Michel,

    Just putting statistics onto the tables concerned will not - and never has
    - garunteed 100% that the query will execute faster. This is as true in
    IngresII 2.5 as it was on Ingres 6.3.

    You may find many reasons why a default stats treatment would be better
    for your query. Skewed data is one, giving the optimizer way too much
    information is another. The latter case is interesting, as you can find
    the query executes faster but spends so much time being optimised the
    overall response is dreadful.

    It would help if you could run the query as a simple SQL session. If this
    is achievable, execute the query as:
    sql dbname << SQL_END
    \script qep_run.with_stats
    set qep; set optimizeonly;
    $Your_Query
    \p\g
    rollback
    \p\g
    \q
    SQL_END

    And then...
    sql dbname << SQL_END
    \script qe90_run.with_stats
    set qep; set trace point qe90;
    $Your_Query
    \p\g
    rollback
    \p\g
    \q
    SQL_END

    Do this with stats and without stats. Change the name of the files
    mentioned in the '\scripts' statements accordingly.

    You can drop the stats on a specific table using:
        statdump -zdl -udbowner dbname -rtablename

    It would also help if you do a:
        statdump -o stats.txt -zn3 -udbowner dbname -rtablename

    Do a help table on each of the tables involved as well.

    Hope this is of some help,

    Martin Bowes

Quote:

> Hello,

> We have a Sun machine with Ingres II 2.5.

> We have a problem with the statistics. When we are running a query
> with statistics (optimzedb -zk) the query is slower then without the
> statistics. Is this a bug in Ingres. Has someone had the same problem
> and how did you deal with it?

> Thanks.

> Kind Regards,

> Michel

--
Random Duckman Quote #40:
Duckman - Oh, you're a deaf mute. Well why didn't you say so!

 
 
 

1. Question about transaction logfile Ingres II 2.5

Hello,

I have a problem with the transaction logfile. We recently went from
OpenIngres 1.2 on a HP to a Sun machine with Ingres II 2.5.

But now we experians problems with the logfile. During the day the
logfile grows to 60% at the end of the day. There aren't any
transactions open.

When we stop and start Ingres during the backup the logfile goes back
to 0%.

The consistensie cp is set on 1%

Does anyone have the same problem or a solution to this problem?

Kind Regards,

Michel
Ingres DBA

2. datacontrol help

3. Ingres installation problem - Ingres II 2.5 on hp-ux 11

4. PDQPRIORITY

5. Ingres II 2.5 on Windows XP Pro

6. DB2 8.1 JDBC driver - Linux JDK1.4 support?

7. Unusual warning message from optimizedb on Ingres II 2.5

8. Lock multiple records

9. 64 bit architecture and Ingres II 2.5

10. Ingres II 2.0 and 2.5

11. Data Im- and Export from/to Ingres II 2.5 and MS-EXCEL

12. Ingres II 2.5 call report paramaters problem

13. Ingres II 2.5 /0006