[Info-Ingres] Slow running queries....
Jean-Pierre Zuate
jpzuate at gmail.com
Thu May 24 09:27:23 CDT 2007
24 May 2007 07:10:33 -0700, Manny <mantas44 at hotmail.com>:
>
> Thank you for your replys.
You're welcome :-)
" Then I think you can add some columns to your table structure :
> - table_1 : release_id, active_date
> - table_2 : release_id, active_date, segment1
> - table_3 : release_id, active_date "
Your where clause reference those columns (and at least release_id and
active_date). Perhap's a QEP on both solutions will show you a difference
...
Karl,
> Optimize stats are only available on the key columns - Should they
> also be on the segment columns?
If you want to take statistics on specific columns (not mentionned in a key
for example, or a varchar, etc), you can use this :
optimizedb your_db -ryour_name -ayour_column (r as Relation and a as
Attribute)
I don't know anything about
> statistics - how are they used and is there an overhead?
Statistics can improve performance, and in some rare cases decrease them.
The "old" rule in Ingres is :
- you must have FRESH statistics (optimizedb)
- if you do not have FRESH statistics, it's better to have old ones than no
statistics at all
The good compromise is :
optimizedb -zh -zk your_db
-zh to print statistics (you can save them in a file and inject that file
later in a DB via optimizedb -i)
-zk to consider all columns declared in a key (in the table structure or
index)
Hope this help,
--
Jean-Pierre Zuate
La Fage Conseil
+33(0)6 11 40 11 09
jpzuate at gmail.com
http://www.ingres-ua.fr/sponsors/la-fage-conseil/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.kettleriverconsulting.com/mailman/private/info-ingres/attachments/20070524/2c15697b/attachment.html
More information about the Info-Ingres
mailing list