Hi,
Just starting to get an understand on reviewing database performance.
Have switched on the query repoisitoy:-
SELECT SET_CONFIG_PARAMETER('QueryRepositoryEnabled', '1');
and run
SELECT ANALYZE_WORKLOAD('', true);
One of the recommendations is :-
tuning_description | run database designer on table public.equityindexoptionkeys
Don't I need to capture any queries running against table public.equityindexoptionkeys to use in the database designer tool or can it be run just against a table?
Will the following query identify the sql using the table:-
select query from SYS_DBA.QUERY_REPO where query like '%equityindexoptionkeys%';
This currently returns no rows.
Regards
Tim
tuning_recommendations and QUERY_REPO
Moderator: NorbertKrupa
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: tuning_recommendations and QUERY_REPO
Hi,
Maybe you can run DD against the query "SELECT * FROM public.equityindexoptionkeys;"
FYI, the only table I could find that contains the complete text of a query is the dc_requests_issued table which contains data from the Data Collector.
So if you've enabled DC, you could try this to find queries against your table:
Warning from the Admin Guide:
Maybe you can run DD against the query "SELECT * FROM public.equityindexoptionkeys;"
FYI, the only table I could find that contains the complete text of a query is the dc_requests_issued table which contains data from the Data Collector.
So if you've enabled DC, you could try this to find queries against your table:
Code: Select all
dbadmin=> select request from dc_requests_issued where request like '%equityindexoptionkeys%';
request
--------------------------------------------------------------------------------------
select request from dc_requests_issued where request like '%equityindexoptionkeys%';
(1 row)
Caution! Data Collector tables (prefixed by dc_) reside in the V_INTERNAL schema and are provided for informational purposes only. They are provided as-is and are subject to change, or be removed, without notice. If you use these tables in scripts or monitoring tools, you may need to change your scripts and tools after a Vertica upgrade. Vertica recommends that you use the Enterprise Edition Workload Analyzer (page 360) instead of accessing the Data Collector tables directly.
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Re: tuning_recommendations and QUERY_REPO
Whether you query QUERY_REPO or dc_requests_issued, you should use ilike instead of like so that you catch any lowercase/uppercase combo of the table name.
Commenting on the original post - if DBD hasn't been run at all, then start with a comprehensive design with a full set of key queries. If you have a good comprehensive design and want to further optimize a single query then run a query-specific design.
Commenting on the original post - if DBD hasn't been run at all, then start with a comprehensive design with a full set of key queries. If you have a good comprehensive design and want to further optimize a single query then run a query-specific design.
Sharon Cutter
Vertica Consultant, Zazz Technologies LLC
Vertica Consultant, Zazz Technologies LLC
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: tuning_recommendations and QUERY_REPO
Scutter - "I like" your recommendation of using ilike instead like! Good catch!
viewtopic.php?f=48&t=104&p=148&hilit=ilike#p148
viewtopic.php?f=48&t=104&p=148&hilit=ilike#p148
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.