From d843a6bca0ba1762fcaa8cc3a05d7097ad014c11 Mon Sep 17 00:00:00 2001 From: Peter Ramm Date: Tue, 29 Aug 2023 14:46:01 +0200 Subject: [PATCH] Update Rails and dependencies Remove underscore from dragnet selection headers --- Gemfile | 2 +- Gemfile.lock | 124 +++++++++--------- .../dragnet_sqls_tuning_sga_pga_helper.rb | 2 +- app/helpers/dragnet/partitioning_helper.rb | 6 +- .../sqls_potential_db_structures_helper.rb | 4 +- .../dragnet/suboptimal_index_usage_helper.rb | 16 +-- .../dragnet/_list_dragnet_sql_result.html.erb | 56 ++++---- config/locales/de.yml | 4 +- 8 files changed, 101 insertions(+), 113 deletions(-) diff --git a/Gemfile b/Gemfile index bcfa9c76..65ae3067 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ ruby '3.1.4' # Alternative instead of complete rails including actioncable etc., prev. version was 6.0.4 # rails_version = "7.0.0" # requires ruby >= 2.7.0 but jRuby 9.3.2.0 is compatible with ruby 2.6 only # see: https://rubygems.org/gems/rails/versions -rails_version = "6.1.7.4" +rails_version = "6.1.7.6" # rails_version = "7.0.4" #gem 'rails', rails_version gem 'activerecord', rails_version diff --git a/Gemfile.lock b/Gemfile.lock index ddfe19ba..90d577c4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,65 +1,65 @@ GEM remote: https://rubygems.org/ specs: - actioncable (6.1.7.4) - actionpack (= 6.1.7.4) - activesupport (= 6.1.7.4) + actioncable (6.1.7.6) + actionpack (= 6.1.7.6) + activesupport (= 6.1.7.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.7.4) - actionpack (= 6.1.7.4) - activejob (= 6.1.7.4) - activerecord (= 6.1.7.4) - activestorage (= 6.1.7.4) - activesupport (= 6.1.7.4) + actionmailbox (6.1.7.6) + actionpack (= 6.1.7.6) + activejob (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) mail (>= 2.7.1) - actionmailer (6.1.7.4) - actionpack (= 6.1.7.4) - actionview (= 6.1.7.4) - activejob (= 6.1.7.4) - activesupport (= 6.1.7.4) + actionmailer (6.1.7.6) + actionpack (= 6.1.7.6) + actionview (= 6.1.7.6) + activejob (= 6.1.7.6) + activesupport (= 6.1.7.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.7.4) - actionview (= 6.1.7.4) - activesupport (= 6.1.7.4) + actionpack (6.1.7.6) + actionview (= 6.1.7.6) + activesupport (= 6.1.7.6) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.7.4) - actionpack (= 6.1.7.4) - activerecord (= 6.1.7.4) - activestorage (= 6.1.7.4) - activesupport (= 6.1.7.4) + actiontext (6.1.7.6) + actionpack (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) nokogiri (>= 1.8.5) - actionview (6.1.7.4) - activesupport (= 6.1.7.4) + actionview (6.1.7.6) + activesupport (= 6.1.7.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.7.4) - activesupport (= 6.1.7.4) + activejob (6.1.7.6) + activesupport (= 6.1.7.6) globalid (>= 0.3.6) - activemodel (6.1.7.4) - activesupport (= 6.1.7.4) - activerecord (6.1.7.4) - activemodel (= 6.1.7.4) - activesupport (= 6.1.7.4) + activemodel (6.1.7.6) + activesupport (= 6.1.7.6) + activerecord (6.1.7.6) + activemodel (= 6.1.7.6) + activesupport (= 6.1.7.6) activerecord-nulldb-adapter (0.9.0) activerecord (>= 5.2.0, < 7.1) activerecord-oracle_enhanced-adapter (6.1.6) activerecord (~> 6.1.0) ruby-plsql (>= 0.6.0) - activestorage (6.1.7.4) - actionpack (= 6.1.7.4) - activejob (= 6.1.7.4) - activerecord (= 6.1.7.4) - activesupport (= 6.1.7.4) + activestorage (6.1.7.6) + actionpack (= 6.1.7.6) + activejob (= 6.1.7.6) + activerecord (= 6.1.7.6) + activesupport (= 6.1.7.6) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.7.4) + activesupport (6.1.7.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -123,20 +123,20 @@ GEM rack (>= 1.2.0) rack-test (2.1.0) rack (>= 1.3) - rails (6.1.7.4) - actioncable (= 6.1.7.4) - actionmailbox (= 6.1.7.4) - actionmailer (= 6.1.7.4) - actionpack (= 6.1.7.4) - actiontext (= 6.1.7.4) - actionview (= 6.1.7.4) - activejob (= 6.1.7.4) - activemodel (= 6.1.7.4) - activerecord (= 6.1.7.4) - activestorage (= 6.1.7.4) - activesupport (= 6.1.7.4) + rails (6.1.7.6) + actioncable (= 6.1.7.6) + actionmailbox (= 6.1.7.6) + actionmailer (= 6.1.7.6) + actionpack (= 6.1.7.6) + actiontext (= 6.1.7.6) + actionview (= 6.1.7.6) + activejob (= 6.1.7.6) + activemodel (= 6.1.7.6) + activerecord (= 6.1.7.6) + activestorage (= 6.1.7.6) + activesupport (= 6.1.7.6) bundler (>= 1.15.0) - railties (= 6.1.7.4) + railties (= 6.1.7.6) sprockets-rails (>= 2.0.0) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) @@ -145,9 +145,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (6.1.7.4) - actionpack (= 6.1.7.4) - activesupport (= 6.1.7.4) + railties (6.1.7.6) + actionpack (= 6.1.7.6) + activesupport (= 6.1.7.6) method_source rake (>= 12.2) thor (~> 1.0) @@ -195,15 +195,15 @@ PLATFORMS universal-java-19 DEPENDENCIES - actionmailer (= 6.1.7.4) - actionpack (= 6.1.7.4) - actionview (= 6.1.7.4) - activejob (= 6.1.7.4) - activemodel (= 6.1.7.4) - activerecord (= 6.1.7.4) + actionmailer (= 6.1.7.6) + actionpack (= 6.1.7.6) + actionview (= 6.1.7.6) + activejob (= 6.1.7.6) + activemodel (= 6.1.7.6) + activerecord (= 6.1.7.6) activerecord-nulldb-adapter activerecord-oracle_enhanced-adapter - activesupport (= 6.1.7.4) + activesupport (= 6.1.7.6) brakeman i18n jarbler @@ -213,8 +213,8 @@ DEPENDENCIES playwright-ruby-client puma (~> 5.0) rack-mini-profiler (~> 2.0) - rails (= 6.1.7.4) - railties (= 6.1.7.4) + rails (= 6.1.7.6) + railties (= 6.1.7.6) rexml sass-rails (>= 6) sprockets-rails diff --git a/app/helpers/dragnet/dragnet_sqls_tuning_sga_pga_helper.rb b/app/helpers/dragnet/dragnet_sqls_tuning_sga_pga_helper.rb index 19d147fb..4edcf3e4 100644 --- a/app/helpers/dragnet/dragnet_sqls_tuning_sga_pga_helper.rb +++ b/app/helpers/dragnet/dragnet_sqls_tuning_sga_pga_helper.rb @@ -76,7 +76,7 @@ def dragnet_sqls_tuning_sga_pga GROUP BY p.Inst_ID, p.SQL_ID, p.Child_Number HAVING -- Ausfuehrungsplan hat genau einen Index-Zugriff ohne Filter - SUM(CASE WHEN p.Operation = 'INDEX' AND p.Options in ('RANGE SCAN', 'UNIQUE SCAN') + SUM(CASE WHEN p.Operation = 'INDEX' AND p.Options in ('RANGE SCAN', 'UNIQUE SCAN', 'SKIP SCAN') THEN 1 ELSE 0 END ) = 1 -- Keine Filter diff --git a/app/helpers/dragnet/partitioning_helper.rb b/app/helpers/dragnet/partitioning_helper.rb index d3e77c14..b96e8950 100644 --- a/app/helpers/dragnet/partitioning_helper.rb +++ b/app/helpers/dragnet/partitioning_helper.rb @@ -119,9 +119,7 @@ def partitioning MAX(p.SQL_ID) KEEP (DENSE_RANK LAST ORDER BY ash.Elapsed_Secs NULLS FIRST) Heaviest_SQL_ID, MAX(ash.Elapsed_Secs) KEEP (DENSE_RANK LAST ORDER BY ash.Elapsed_Secs NULLS FIRST) Heaviest_SQL_Elapsed_Secs FROM ( - SELECT Inst_ID, Object_Owner, Object_Name, SQL_ID, Plan_Line_ID, Plan_Hash_Value, SUM(Executions) Executions, - LISTAGG(Partition_Start, ',') WITHIN GROUP (ORDER BY Partition_Start) Partition_Start_Values, - LISTAGG(Partition_Stop, ',') WITHIN GROUP (ORDER BY Partition_Stop) Partition_Stop_Values + SELECT Inst_ID, Object_Owner, Object_Name, SQL_ID, Plan_Line_ID, Plan_Hash_Value, SUM(Executions) Executions FROM ( SELECT /*+ NO_MERGE MATERIALIZE */ p.Inst_ID, p.Object_Owner, p.Object_Name, p.SQL_ID, p.Partition_Start, p.Partition_Stop, p.Object_Type, p.Options, p.ID Plan_Line_ID, p.Plan_Hash_Value, s.Executions @@ -139,7 +137,7 @@ def partitioning WHERE Partition_Start IS NOT NULL AND Object_Name IS NOT NULL AND Object_Type LIKE 'INDEX%' - AND Options IN ('UNIQUE SCAN', 'RANGE SCAN', 'RANGE SCAN (MIN/MAX)') + AND Options IN ('UNIQUE SCAN', 'RANGE SCAN', 'RANGE SCAN (MIN/MAX)', 'SKIP SCAN') GROUP BY Inst_ID, Object_Owner, Object_Name, SQL_ID, Plan_Hash_Value, Plan_Line_ID ) p LEFT OUTER JOIN Ash ON ash.Instance_Number = p.Inst_ID AND ash.SQL_ID = p.SQL_ID AND ash.SQL_Plan_Hash_Value = p.Plan_Hash_Value AND ash.SQL_Plan_Line_ID = p.Plan_Line_ID diff --git a/app/helpers/dragnet/sqls_potential_db_structures_helper.rb b/app/helpers/dragnet/sqls_potential_db_structures_helper.rb index f6c8a666..c8cd04ca 100644 --- a/app/helpers/dragnet/sqls_potential_db_structures_helper.rb +++ b/app/helpers/dragnet/sqls_potential_db_structures_helper.rb @@ -364,7 +364,7 @@ def sqls_potential_db_structures GROUP BY Inst_ID, SQL_ID, SQL_Plan_Hash_Value, SQL_Plan_Line_ID ) h ON h.Inst_ID=p.Inst_ID AND h.SQL_ID=p.SQL_ID AND h.SQL_Plan_Hash_Value=p.Plan_Hash_Value AND h.SQL_Plan_Line_ID=p.ID LEFT OUTER JOIN DBA_Tables t ON t.Owner = p.Object_Owner AND t.Table_Name = p.Object_Name - WHERE p.Operation = 'TABLE ACCESS' AND p.Options = 'BY INDEX ROWID' + WHERE p.Operation = 'TABLE ACCESS' AND p.Options LIKE 'BY INDEX ROWID%' AND p.Object_Owner NOT IN (#{system_schema_subselect}) AND NVL(t.Num_Rows, 0) < ? ) x @@ -395,7 +395,7 @@ def sqls_potential_db_structures GROUP BY DBID, Instance_Number, SQL_ID, SQL_Plan_Hash_Value, SQL_Plan_Line_ID ) h ON h.DBID = p.DBID AND h.SQL_ID=p.SQL_ID AND h.SQL_Plan_Hash_Value=p.Plan_Hash_Value AND h.SQL_Plan_Line_ID=p.ID LEFT OUTER JOIN DBA_Tables t ON t.Owner = p.Object_Owner AND t.Table_Name = p.Object_Name - WHERE p.Operation = 'TABLE ACCESS' AND p.Options = 'BY INDEX ROWID' + WHERE p.Operation = 'TABLE ACCESS' AND p.Options LIKE 'BY INDEX ROWID%' AND p.Object_Owner NOT IN (#{system_schema_subselect}) AND NVL(t.Num_Rows, 0) < ? ) diff --git a/app/helpers/dragnet/suboptimal_index_usage_helper.rb b/app/helpers/dragnet/suboptimal_index_usage_helper.rb index 06d8c87c..1e6c8082 100644 --- a/app/helpers/dragnet/suboptimal_index_usage_helper.rb +++ b/app/helpers/dragnet/suboptimal_index_usage_helper.rb @@ -34,7 +34,7 @@ def suboptimal_index_usage }, { :name => t(:dragnet_helper_115_name, :default => 'Excessive filtering after TABLE ACCESS BY ROWID due to weak index access criteria (current SGA)'), - :desc => t(:dragnet_helper_115_desc, :default => 'INDEX RANGE SCAN with high number of rows returned and restrictive filter after TABLE ACCESS BY ROWID leads to unnecessary effort for table access before rejecting table records from result. + :desc => t(:dragnet_helper_115_desc, :default => 'INDEX RANGE|SKIP SCAN with high number of rows returned and restrictive filter after TABLE ACCESS BY ROWID leads to unnecessary effort for table access before rejecting table records from result. You should consider to expand index by filter criterias of table access to reduce number of TABLE ACCESS BY ROWID. This selection evaluates the current content of SGA. Result is sorted by time effort for operation TABLE ACCESS BY ROWID. @@ -45,15 +45,15 @@ def suboptimal_index_usage ash.Min_Sample_Time, ash.Max_Sample_Time FROM (SELECT /*+ MO_MERGE */ Inst_ID, SQL_ID, Plan_Hash_Value, Child_Number, Address, Access_Predicates, Filter_Predicates, ID, Cardinality, Object_Owner, Object_Name FROM gv$SQL_Plan - WHERE Operation = 'TABLE ACCESS' AND Options LIKE 'BY%INDEX ROWID' /* should also catch BY LOCAL INDEX ROWID */ + WHERE Operation = 'TABLE ACCESS' AND Options LIKE 'BY%INDEX ROWID%' /* should also catch BY LOCAL INDEX ROWID and INDEX ROWID BATCHED */ ) ta JOIN (SELECT /*+ MO_MERGE */ Inst_ID, SQL_ID, Plan_Hash_Value, Child_Number, Address, Access_Predicates, Filter_Predicates, Parent_ID, Cardinality, Object_Owner, Object_Name FROM gv$SQL_Plan - WHERE Operation = 'INDEX' AND Options = 'RANGE SCAN' + WHERE Operation = 'INDEX' AND Options IN ('RANGE SCAN', 'SKIP SCAN') ) ir ON ir.Inst_ID=ta.Inst_ID AND ir.SQL_ID=ta.SQL_ID AND ir.Plan_Hash_Value=ta.Plan_Hash_Value AND ir.Child_Number=ta.Child_Number AND ir.Address=ta.Address AND ir.Parent_ID=ta.ID JOIN (SELECT /*+ NO_MERGE */ Inst_ID, SQL_ID, SQL_Child_Number, SQL_Plan_Hash_Value, SQL_Plan_Line_ID, COUNT(*) Seconds, MIN(Sample_Time) Min_Sample_Time, MAX(Sample_Time) Max_Sample_Time FROM gv$Active_Session_History - WHERE SQL_Plan_Operation = 'TABLE ACCESS' AND SQL_Plan_Options LIKE 'BY%INDEX ROWID' /* only for this operation */ + WHERE SQL_Plan_Operation = 'TABLE ACCESS' AND SQL_Plan_Options LIKE 'BY%INDEX ROWID%' /* only for this operation */ GROUP BY Inst_ID, SQL_ID, SQL_Child_Number, SQL_Plan_Hash_Value, SQL_Plan_Line_ID HAVING COUNT(*) > ? ) ash ON ash.Inst_ID=ta.Inst_ID AND ash.SQL_ID=ta.SQL_ID AND ash.SQL_Child_Number=ta.Child_Number AND ash.SQL_Plan_Hash_Value=ta.Plan_Hash_Value AND ash.SQL_Plan_Line_ID=ta.ID @@ -67,7 +67,7 @@ def suboptimal_index_usage }, { :name => t(:dragnet_helper_116_name, :default => 'Excessive filtering after TABLE ACCESS BY ROWID due to weak index access criteria (AWR history)'), - :desc => t(:dragnet_helper_116_desc, :default => 'INDEX RANGE SCAN with high number of rows returned and restrictive filter after TABLE ACCESS BY ROWID leads to unnecessary effort for table access before rejecting table records from result. + :desc => t(:dragnet_helper_116_desc, :default => 'INDEX RANGE|SKIP SCAN with high number of rows returned and restrictive filter after TABLE ACCESS BY ROWID leads to unnecessary effort for table access before rejecting table records from result. You should consider to expand index by filter criterias of table access to reduce number of TABLE ACCESS BY ROWID. This selection evaluates the AWR history. Result is sorted by time effort for operation TABLE ACCESS BY ROWID. @@ -76,16 +76,16 @@ def suboptimal_index_usage ir.Access_Predicates Access_Index, ir.Filter_Predicates Filter_Index, ta.Access_Predicates Access_Index, ta.Filter_Predicates Filter_Index, ROUND(ir.Cardinality/ta.Cardinality) Cardinality_Ratio, ash.Seconds Elapsed_Seconds FROM (SELECT /*+ MO_MERGE */ DBID, SQL_ID, Plan_Hash_Value, Access_Predicates, Filter_Predicates, ID, Cardinality, Object_Owner, Object_Name FROM DBA_Hist_SQL_Plan - WHERE Operation = 'TABLE ACCESS' AND Options LIKE 'BY%INDEX ROWID' /* should also catch BY LOCAL INDEX ROWID */ + WHERE Operation = 'TABLE ACCESS' AND Options LIKE 'BY%INDEX ROWID%' /* should also catch BY LOCAL INDEX ROWID and INDEX ROWID BATCHED */ ) ta JOIN (SELECT /*+ MO_MERGE */ DBID, SQL_ID, Plan_Hash_Value, Access_Predicates, Filter_Predicates, Parent_ID, Cardinality, Object_Owner, Object_Name FROM DBA_Hist_SQL_Plan - WHERE Operation = 'INDEX' AND Options = 'RANGE SCAN' + WHERE Operation = 'INDEX' AND Options IN ('RANGE SCAN', 'SKIP SCAN') ) ir ON ir.DBID=ta.DBID AND ir.SQL_ID=ta.SQL_ID AND ir.Plan_Hash_Value=ta.Plan_Hash_Value AND ir.Parent_ID=ta.ID JOIN (SELECT /*+ NO_MERGE */ DBID, Instance_Number, SQL_ID, SQL_Child_Number, SQL_Plan_Hash_Value, SQL_Plan_Line_ID, COUNT(*) Seconds FROM DBA_Hist_Active_Sess_History WHERE Sample_Time > SYSDATE - ? - AND SQL_Plan_Operation = 'TABLE ACCESS' AND SQL_Plan_Options LIKE 'BY%INDEX ROWID' + AND SQL_Plan_Operation = 'TABLE ACCESS' AND SQL_Plan_Options LIKE 'BY%INDEX ROWID%' AND DBID = #{get_dbid} /* do not count multiple times for multipe different DBIDs/ConIDs */ GROUP BY DBID, Instance_Number, SQL_ID, SQL_Child_Number, SQL_Plan_Hash_Value, SQL_Plan_Line_ID HAVING COUNT(*) > ? diff --git a/app/views/dragnet/_list_dragnet_sql_result.html.erb b/app/views/dragnet/_list_dragnet_sql_result.html.erb index cb2b7fbc..185d6cc0 100644 --- a/app/views/dragnet/_list_dragnet_sql_result.html.erb +++ b/app/views/dragnet/_list_dragnet_sql_result.html.erb @@ -10,9 +10,10 @@ if @res.count > 0 i = 0 @res[0].each do |key, value| # Iteration über Spalten der ersten Zeile i += 1 - @column_options << {:caption=>key, - :title=>key, - #:data_title=>proc{|rec| "#{key}: Classname=#{rec[key].class.name}"} + @column_options << { + caption: key.gsub('_', ' '), # allow wrap of column header in slickgrid + col_ref: key, # Reference in result set because original caption is modified + title: key, } raise "Problem with column #{i} of SQL result! Column header is empty.\nSQL columns identifier may not be processable by ActiveRecord." if key.nil? end @@ -25,9 +26,9 @@ if @res.count > 0 return number.length-index-1 end - # does column with caption exists in result + # does column with col_ref exists in result def column_exists?(list) - @column_options.select{|e| list.include?(e[:caption])}.length > 0 + @column_options.select{|e| list.include?(e[:col_ref])}.length > 0 end #Iterieren über Spalten des Results @@ -37,7 +38,7 @@ if @res.count > 0 isDate = true scale = 0 # Anzahl Nachkommastellen @res.each do |r| # Iteration über Zeilen des Results - fieldval = r[col[:caption]] # Aktueller Feldinhalt + fieldval = r[col[:col_ref]] # Aktueller Feldinhalt if isNumber && fieldval.class!=Integer && fieldval.class.name !='Fixnum' && fieldval.class!=BigDecimal && fieldval.class!=NilClass # Prüfen auf alle Werte der Spalte numerisch isNumber = false; @@ -53,7 +54,7 @@ if @res.count > 0 end case - when sql_id_captions.select{|s| col[:caption].downcase[s]}.length > 0 then + when sql_id_captions.select{|s| col[:col_ref].downcase[s]}.length > 0 then col[:data] = proc{|rec| inst_id = nil @@ -78,25 +79,15 @@ if @res.count > 0 con_id = nil con_id = rec['con_id'] if rec['con_id'] - #link_sql_id('exec_dragnet_sql_detail_area', inst_id, my_html_escape(rec[col[:caption]])) - - link_current_or_historic_sql_id(:exec_dragnet_sql_detail_area, inst_id, my_html_escape(rec[col[:caption]]), time_selection_start, time_selection_end, parsing_schema_name, con_id) - - #link_historic_sql_id(inst_id, - # my_html_escape(rec[col[:caption]]) , - # time_selection_start, - # time_selection_end, - # :exec_dragnet_sql_detail_area - #) - + link_current_or_historic_sql_id(:exec_dragnet_sql_detail_area, inst_id, my_html_escape(rec[col[:col_ref]]), time_selection_start, time_selection_end, parsing_schema_name, con_id) } when ['table_name', 'table name', 'tablename', 'referenced table', 'table-name', 'log_table', 'object_name', 'master_table', 'sequence_name', 'view_name', 'object according to ash', 'object according to sql plan', 'target_table' - ].include?(col[:caption].downcase) || - col[:caption].downcase['_view'] + ].include?(col[:col_ref].downcase) || + col[:col_ref].downcase['_view'] then col[:data] = proc{|rec| - table_name = rec[col[:caption]] + table_name = rec[col[:col_ref]] owner = nil # Default if !table_name.nil? && table_name['.'] # extract schema and tablename from schema.tablename @@ -113,16 +104,16 @@ if @res.count > 0 owner = rec['sequence_owner'] if rec['sequence_owner'] && !owner owner = rec['log_owner'] if rec['log_owner'] && !owner if owner - link_object_description(:exec_dragnet_sql_detail_area, owner, my_html_escape(table_name), my_html_escape(rec[col[:caption]])) + link_object_description(:exec_dragnet_sql_detail_area, owner, my_html_escape(table_name), my_html_escape(rec[col[:col_ref]])) else - my_html_escape(rec[col[:caption]]) # Ohne Link + my_html_escape(rec[col[:col_ref]]) # Ohne Link end } # Check for link on index_name - when ['index_name'].include?(col[:caption].downcase) + when ['index_name'].include?(col[:col_ref].downcase) then col[:data] = proc{|rec| - index_name = rec[col[:caption]] + index_name = rec[col[:col_ref]] owner = nil # Default if !index_name.nil? && index_name['.'] # extract schema and tablename from schema.tablename @@ -135,12 +126,12 @@ if @res.count > 0 owner = rec['Owner'] if rec['Owner'] && !owner owner = rec['Owner'] if rec['Owner'] && !owner if owner - link_object_description(:exec_dragnet_sql_detail_area, owner, my_html_escape(index_name), my_html_escape(rec[col[:caption]])) + link_object_description(:exec_dragnet_sql_detail_area, owner, my_html_escape(index_name), my_html_escape(rec[col[:col_ref]])) else - my_html_escape(rec[col[:caption]]) # Ohne Link + my_html_escape(rec[col[:col_ref]]) # Ohne Link end } - when sid_captions.include?(col[:caption].downcase) && column_exists?(serial_number_captions) && column_exists?(instance_captions) + when sid_captions.include?(col[:col_ref].downcase) && column_exists?(serial_number_captions) && column_exists?(instance_captions) then col[:data] = proc do |rec| instance = nil @@ -152,24 +143,23 @@ if @res.count > 0 serial_number_captions.each do |snc| serial_no = rec[snc] if rec[snc] end - link_session_details(:exec_dragnet_sql_detail_area, instance, rec[col[:caption]], serial_no, print_val: fn(rec[col[:caption]])) + link_session_details(:exec_dragnet_sql_detail_area, instance, rec[col[:col_ref]], serial_no, print_val: fn(rec[col[:col_ref]])) #"#{instance}, #{serial_no}" end col[:align] = :right when isNumber then - col[:data] = proc{|rec| formattedNumber(rec[col[:caption]], scale)} + col[:data] = proc{|rec| formattedNumber(rec[col[:col_ref]], scale)} col[:align] = :right when isDate then - col[:data] = proc{|rec| localeDateTime(rec[col[:caption]])} + col[:data] = proc{|rec| localeDateTime(rec[col[:col_ref]])} unless chart_x_axis_found col[:plot_master_time] = true chart_x_axis_found = true end else - col[:data] = proc{|rec| my_html_escape(rec[col[:caption]]) } + col[:data] = proc{|rec| my_html_escape(rec[col[:col_ref]]) } end end - %> <%= gen_slickgrid(@res, @column_options, {:caption => @caption, :plot_area_id => "exec_dragnet_sql_detail_area", :max_height=>450, show_pin_icon: 1}) %> diff --git a/config/locales/de.yml b/config/locales/de.yml index e7cadc4a..7e9f7eff 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1268,7 +1268,7 @@ dragnet_helper_114_param_1_name: Anzahl Zeichen für Vergleich der SQLs dragnet_helper_115_desc: |- - INDEX RANGE SCAN mit einer hohen Anzahl von Treffern und restriktiver Filter nach dem TABLE ACCESS BY ROWID führt zu unnötigem Aufwand in table access bevor die Zeilen aus dem Resultat verworfen werden. + INDEX RANGE|SKIP SCAN mit einer hohen Anzahl von Treffern und restriktiver Filter nach dem TABLE ACCESS BY ROWID führt zu unnötigem Aufwand in table access bevor die Zeilen aus dem Resultat verworfen werden. Es sollte die Möglichkeit betrachtet werden, den Index um die Filter-Spalten des Tabellenzugriffs zu erweitern um die Anzahl TABLE ACCESS BY ROWID zu reduzieren. Die Selektion wertet den aktuellen Inhalt der SGA aus. Das Resultat ist sortiert nach dem Zeitaufwand für die Operation TABLE ACCESS BY ROWID. @@ -1280,7 +1280,7 @@ dragnet_helper_115_param_2_name: Minimale Database-Time der Operation TABLE ACCESS BY ROWID in ASH (Sekunden) dragnet_helper_116_desc: |- - INDEX RANGE SCAN mit einer hohen Anzahl von Treffern und restriktiver Filter nach dem TABLE ACCESS BY ROWID führt zu unnötigem Aufwand in table access bevor die Zeilen aus dem Resultat verworfen werden. + INDEX RANGE|SKIP SCAN mit einer hohen Anzahl von Treffern und restriktiver Filter nach dem TABLE ACCESS BY ROWID führt zu unnötigem Aufwand in table access bevor die Zeilen aus dem Resultat verworfen werden. Es sollte die Möglichkeit betrachtet werden, den Index um die Filter-Spalten des Tabellenzugriffs zu erweitern um die Anzahl TABLE ACCESS BY ROWID zu reduzieren. Die Selektion wertet die Historie aus AWR aus. Das Resultat ist sortiert nach dem Zeitaufwand für die Operation TABLE ACCESS BY ROWID.