Class: OCI::DatabaseManagement::Models::SqlTuningAdvisorTaskFindingSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::SqlTuningAdvisorTaskFindingSummary
- Defined in:
- lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb
Overview
A summary for all the findings of objects in a tuning task that match a given certain filter. Includes what kind of findings were found, whether benefits were analyzed, and how many benefits can be obtained.
Instance Attribute Summary collapse
-
#db_time_benefit ⇒ Float
Time benefit in seconds for the highest-rated finding for this object.
-
#is_alternative_plan_finding_present ⇒ BOOLEAN
Whether an alternative execution plan was found for this SQL statement.
-
#is_error_finding_present ⇒ BOOLEAN
Whether there is an error in this SQL statement.
-
#is_index_finding_present ⇒ BOOLEAN
Whether an index recommendation was found for this SQL statement.
-
#is_miscellaneous_finding_present ⇒ BOOLEAN
Whether a miscellaneous finding was found for this SQL statement.
-
#is_restructure_sql_finding_present ⇒ BOOLEAN
Whether a restructure SQL recommendation was found for this SQL statement.
-
#is_sql_profile_finding_implemented ⇒ BOOLEAN
Whether a SQL Profile recommendation has been implemented for this SQL statement.
-
#is_sql_profile_finding_present ⇒ BOOLEAN
Whether a SQL Profile recommendation was found for this SQL statement.
-
#is_stats_finding_present ⇒ BOOLEAN
Whether a statistics recommendation was found for this SQL statement.
-
#is_timeout_finding_present ⇒ BOOLEAN
Whether the task timed out.
-
#parsing_schema ⇒ String
[Required] Parsing schema of the object.
-
#per_execution_percentage ⇒ Integer
The per-execution percentage benefit.
-
#sql_key ⇒ String
[Required] Unique key of this SQL statement.
-
#sql_text ⇒ String
[Required] Text of the SQL statement.
-
#sql_tuning_advisor_task_id ⇒ Integer
[Required] Unique identifier of the task.
-
#sql_tuning_advisor_task_object_execution_id ⇒ Integer
[Required] Execution id of the analyzed SQL object.
-
#sql_tuning_advisor_task_object_id ⇒ Integer
[Required] Key of the object to which these recommendations apply.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ SqlTuningAdvisorTaskFindingSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ SqlTuningAdvisorTaskFindingSummary
Initializes the object
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 155 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.sql_tuning_advisor_task_id = attributes[:'sqlTuningAdvisorTaskId'] if attributes[:'sqlTuningAdvisorTaskId'] raise 'You cannot provide both :sqlTuningAdvisorTaskId and :sql_tuning_advisor_task_id' if attributes.key?(:'sqlTuningAdvisorTaskId') && attributes.key?(:'sql_tuning_advisor_task_id') self.sql_tuning_advisor_task_id = attributes[:'sql_tuning_advisor_task_id'] if attributes[:'sql_tuning_advisor_task_id'] self.sql_tuning_advisor_task_object_id = attributes[:'sqlTuningAdvisorTaskObjectId'] if attributes[:'sqlTuningAdvisorTaskObjectId'] raise 'You cannot provide both :sqlTuningAdvisorTaskObjectId and :sql_tuning_advisor_task_object_id' if attributes.key?(:'sqlTuningAdvisorTaskObjectId') && attributes.key?(:'sql_tuning_advisor_task_object_id') self.sql_tuning_advisor_task_object_id = attributes[:'sql_tuning_advisor_task_object_id'] if attributes[:'sql_tuning_advisor_task_object_id'] self.sql_tuning_advisor_task_object_execution_id = attributes[:'sqlTuningAdvisorTaskObjectExecutionId'] if attributes[:'sqlTuningAdvisorTaskObjectExecutionId'] raise 'You cannot provide both :sqlTuningAdvisorTaskObjectExecutionId and :sql_tuning_advisor_task_object_execution_id' if attributes.key?(:'sqlTuningAdvisorTaskObjectExecutionId') && attributes.key?(:'sql_tuning_advisor_task_object_execution_id') self.sql_tuning_advisor_task_object_execution_id = attributes[:'sql_tuning_advisor_task_object_execution_id'] if attributes[:'sql_tuning_advisor_task_object_execution_id'] self.sql_text = attributes[:'sqlText'] if attributes[:'sqlText'] raise 'You cannot provide both :sqlText and :sql_text' if attributes.key?(:'sqlText') && attributes.key?(:'sql_text') self.sql_text = attributes[:'sql_text'] if attributes[:'sql_text'] self.parsing_schema = attributes[:'parsingSchema'] if attributes[:'parsingSchema'] raise 'You cannot provide both :parsingSchema and :parsing_schema' if attributes.key?(:'parsingSchema') && attributes.key?(:'parsing_schema') self.parsing_schema = attributes[:'parsing_schema'] if attributes[:'parsing_schema'] self.sql_key = attributes[:'sqlKey'] if attributes[:'sqlKey'] raise 'You cannot provide both :sqlKey and :sql_key' if attributes.key?(:'sqlKey') && attributes.key?(:'sql_key') self.sql_key = attributes[:'sql_key'] if attributes[:'sql_key'] self.db_time_benefit = attributes[:'dbTimeBenefit'] if attributes[:'dbTimeBenefit'] raise 'You cannot provide both :dbTimeBenefit and :db_time_benefit' if attributes.key?(:'dbTimeBenefit') && attributes.key?(:'db_time_benefit') self.db_time_benefit = attributes[:'db_time_benefit'] if attributes[:'db_time_benefit'] self.per_execution_percentage = attributes[:'perExecutionPercentage'] if attributes[:'perExecutionPercentage'] raise 'You cannot provide both :perExecutionPercentage and :per_execution_percentage' if attributes.key?(:'perExecutionPercentage') && attributes.key?(:'per_execution_percentage') self.per_execution_percentage = attributes[:'per_execution_percentage'] if attributes[:'per_execution_percentage'] self.is_stats_finding_present = attributes[:'isStatsFindingPresent'] unless attributes[:'isStatsFindingPresent'].nil? raise 'You cannot provide both :isStatsFindingPresent and :is_stats_finding_present' if attributes.key?(:'isStatsFindingPresent') && attributes.key?(:'is_stats_finding_present') self.is_stats_finding_present = attributes[:'is_stats_finding_present'] unless attributes[:'is_stats_finding_present'].nil? self.is_sql_profile_finding_present = attributes[:'isSqlProfileFindingPresent'] unless attributes[:'isSqlProfileFindingPresent'].nil? raise 'You cannot provide both :isSqlProfileFindingPresent and :is_sql_profile_finding_present' if attributes.key?(:'isSqlProfileFindingPresent') && attributes.key?(:'is_sql_profile_finding_present') self.is_sql_profile_finding_present = attributes[:'is_sql_profile_finding_present'] unless attributes[:'is_sql_profile_finding_present'].nil? self.is_sql_profile_finding_implemented = attributes[:'isSqlProfileFindingImplemented'] unless attributes[:'isSqlProfileFindingImplemented'].nil? raise 'You cannot provide both :isSqlProfileFindingImplemented and :is_sql_profile_finding_implemented' if attributes.key?(:'isSqlProfileFindingImplemented') && attributes.key?(:'is_sql_profile_finding_implemented') self.is_sql_profile_finding_implemented = attributes[:'is_sql_profile_finding_implemented'] unless attributes[:'is_sql_profile_finding_implemented'].nil? self.is_index_finding_present = attributes[:'isIndexFindingPresent'] unless attributes[:'isIndexFindingPresent'].nil? raise 'You cannot provide both :isIndexFindingPresent and :is_index_finding_present' if attributes.key?(:'isIndexFindingPresent') && attributes.key?(:'is_index_finding_present') self.is_index_finding_present = attributes[:'is_index_finding_present'] unless attributes[:'is_index_finding_present'].nil? self.is_restructure_sql_finding_present = attributes[:'isRestructureSqlFindingPresent'] unless attributes[:'isRestructureSqlFindingPresent'].nil? raise 'You cannot provide both :isRestructureSqlFindingPresent and :is_restructure_sql_finding_present' if attributes.key?(:'isRestructureSqlFindingPresent') && attributes.key?(:'is_restructure_sql_finding_present') self.is_restructure_sql_finding_present = attributes[:'is_restructure_sql_finding_present'] unless attributes[:'is_restructure_sql_finding_present'].nil? self.is_alternative_plan_finding_present = attributes[:'isAlternativePlanFindingPresent'] unless attributes[:'isAlternativePlanFindingPresent'].nil? raise 'You cannot provide both :isAlternativePlanFindingPresent and :is_alternative_plan_finding_present' if attributes.key?(:'isAlternativePlanFindingPresent') && attributes.key?(:'is_alternative_plan_finding_present') self.is_alternative_plan_finding_present = attributes[:'is_alternative_plan_finding_present'] unless attributes[:'is_alternative_plan_finding_present'].nil? self.is_miscellaneous_finding_present = attributes[:'isMiscellaneousFindingPresent'] unless attributes[:'isMiscellaneousFindingPresent'].nil? raise 'You cannot provide both :isMiscellaneousFindingPresent and :is_miscellaneous_finding_present' if attributes.key?(:'isMiscellaneousFindingPresent') && attributes.key?(:'is_miscellaneous_finding_present') self.is_miscellaneous_finding_present = attributes[:'is_miscellaneous_finding_present'] unless attributes[:'is_miscellaneous_finding_present'].nil? self.is_error_finding_present = attributes[:'isErrorFindingPresent'] unless attributes[:'isErrorFindingPresent'].nil? raise 'You cannot provide both :isErrorFindingPresent and :is_error_finding_present' if attributes.key?(:'isErrorFindingPresent') && attributes.key?(:'is_error_finding_present') self.is_error_finding_present = attributes[:'is_error_finding_present'] unless attributes[:'is_error_finding_present'].nil? self.is_timeout_finding_present = attributes[:'isTimeoutFindingPresent'] unless attributes[:'isTimeoutFindingPresent'].nil? raise 'You cannot provide both :isTimeoutFindingPresent and :is_timeout_finding_present' if attributes.key?(:'isTimeoutFindingPresent') && attributes.key?(:'is_timeout_finding_present') self.is_timeout_finding_present = attributes[:'is_timeout_finding_present'] unless attributes[:'is_timeout_finding_present'].nil? end |
Instance Attribute Details
#db_time_benefit ⇒ Float
Time benefit in seconds for the highest-rated finding for this object.
40 41 42 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 40 def db_time_benefit @db_time_benefit end |
#is_alternative_plan_finding_present ⇒ BOOLEAN
Whether an alternative execution plan was found for this SQL statement.
68 69 70 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 68 def is_alternative_plan_finding_present @is_alternative_plan_finding_present end |
#is_error_finding_present ⇒ BOOLEAN
Whether there is an error in this SQL statement.
76 77 78 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 76 def is_error_finding_present @is_error_finding_present end |
#is_index_finding_present ⇒ BOOLEAN
Whether an index recommendation was found for this SQL statement.
60 61 62 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 60 def is_index_finding_present @is_index_finding_present end |
#is_miscellaneous_finding_present ⇒ BOOLEAN
Whether a miscellaneous finding was found for this SQL statement.
72 73 74 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 72 def is_miscellaneous_finding_present @is_miscellaneous_finding_present end |
#is_restructure_sql_finding_present ⇒ BOOLEAN
Whether a restructure SQL recommendation was found for this SQL statement.
64 65 66 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 64 def is_restructure_sql_finding_present @is_restructure_sql_finding_present end |
#is_sql_profile_finding_implemented ⇒ BOOLEAN
Whether a SQL Profile recommendation has been implemented for this SQL statement.
56 57 58 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 56 def is_sql_profile_finding_implemented @is_sql_profile_finding_implemented end |
#is_sql_profile_finding_present ⇒ BOOLEAN
Whether a SQL Profile recommendation was found for this SQL statement.
52 53 54 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 52 def is_sql_profile_finding_present @is_sql_profile_finding_present end |
#is_stats_finding_present ⇒ BOOLEAN
Whether a statistics recommendation was found for this SQL statement.
48 49 50 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 48 def is_stats_finding_present @is_stats_finding_present end |
#is_timeout_finding_present ⇒ BOOLEAN
Whether the task timed out.
80 81 82 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 80 def is_timeout_finding_present @is_timeout_finding_present end |
#parsing_schema ⇒ String
[Required] Parsing schema of the object.
32 33 34 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 32 def parsing_schema @parsing_schema end |
#per_execution_percentage ⇒ Integer
The per-execution percentage benefit.
44 45 46 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 44 def per_execution_percentage @per_execution_percentage end |
#sql_key ⇒ String
[Required] Unique key of this SQL statement
36 37 38 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 36 def sql_key @sql_key end |
#sql_text ⇒ String
[Required] Text of the SQL statement.
28 29 30 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 28 def sql_text @sql_text end |
#sql_tuning_advisor_task_id ⇒ Integer
[Required] Unique identifier of the task. It is not the [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
14 15 16 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 14 def sql_tuning_advisor_task_id @sql_tuning_advisor_task_id end |
#sql_tuning_advisor_task_object_execution_id ⇒ Integer
[Required] Execution id of the analyzed SQL object. It is not the [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
24 25 26 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 24 def sql_tuning_advisor_task_object_execution_id @sql_tuning_advisor_task_object_execution_id end |
#sql_tuning_advisor_task_object_id ⇒ Integer
[Required] Key of the object to which these recommendations apply. It is not the [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
20 21 22 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 20 def sql_tuning_advisor_task_object_id @sql_tuning_advisor_task_object_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 83 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'sql_tuning_advisor_task_id': :'sqlTuningAdvisorTaskId', 'sql_tuning_advisor_task_object_id': :'sqlTuningAdvisorTaskObjectId', 'sql_tuning_advisor_task_object_execution_id': :'sqlTuningAdvisorTaskObjectExecutionId', 'sql_text': :'sqlText', 'parsing_schema': :'parsingSchema', 'sql_key': :'sqlKey', 'db_time_benefit': :'dbTimeBenefit', 'per_execution_percentage': :'perExecutionPercentage', 'is_stats_finding_present': :'isStatsFindingPresent', 'is_sql_profile_finding_present': :'isSqlProfileFindingPresent', 'is_sql_profile_finding_implemented': :'isSqlProfileFindingImplemented', 'is_index_finding_present': :'isIndexFindingPresent', 'is_restructure_sql_finding_present': :'isRestructureSqlFindingPresent', 'is_alternative_plan_finding_present': :'isAlternativePlanFindingPresent', 'is_miscellaneous_finding_present': :'isMiscellaneousFindingPresent', 'is_error_finding_present': :'isErrorFindingPresent', 'is_timeout_finding_present': :'isTimeoutFindingPresent' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 108 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'sql_tuning_advisor_task_id': :'Integer', 'sql_tuning_advisor_task_object_id': :'Integer', 'sql_tuning_advisor_task_object_execution_id': :'Integer', 'sql_text': :'String', 'parsing_schema': :'String', 'sql_key': :'String', 'db_time_benefit': :'Float', 'per_execution_percentage': :'Integer', 'is_stats_finding_present': :'BOOLEAN', 'is_sql_profile_finding_present': :'BOOLEAN', 'is_sql_profile_finding_implemented': :'BOOLEAN', 'is_index_finding_present': :'BOOLEAN', 'is_restructure_sql_finding_present': :'BOOLEAN', 'is_alternative_plan_finding_present': :'BOOLEAN', 'is_miscellaneous_finding_present': :'BOOLEAN', 'is_error_finding_present': :'BOOLEAN', 'is_timeout_finding_present': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 271 def ==(other) return true if equal?(other) self.class == other.class && sql_tuning_advisor_task_id == other.sql_tuning_advisor_task_id && sql_tuning_advisor_task_object_id == other.sql_tuning_advisor_task_object_id && sql_tuning_advisor_task_object_execution_id == other.sql_tuning_advisor_task_object_execution_id && sql_text == other.sql_text && parsing_schema == other.parsing_schema && sql_key == other.sql_key && db_time_benefit == other.db_time_benefit && per_execution_percentage == other.per_execution_percentage && is_stats_finding_present == other.is_stats_finding_present && is_sql_profile_finding_present == other.is_sql_profile_finding_present && is_sql_profile_finding_implemented == other.is_sql_profile_finding_implemented && is_index_finding_present == other.is_index_finding_present && is_restructure_sql_finding_present == other.is_restructure_sql_finding_present && is_alternative_plan_finding_present == other.is_alternative_plan_finding_present && is_miscellaneous_finding_present == other.is_miscellaneous_finding_present && is_error_finding_present == other.is_error_finding_present && is_timeout_finding_present == other.is_timeout_finding_present end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 317 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
297 298 299 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 297 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
306 307 308 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 306 def hash [sql_tuning_advisor_task_id, sql_tuning_advisor_task_object_id, sql_tuning_advisor_task_object_execution_id, sql_text, parsing_schema, sql_key, db_time_benefit, per_execution_percentage, is_stats_finding_present, is_sql_profile_finding_present, is_sql_profile_finding_implemented, is_index_finding_present, is_restructure_sql_finding_present, is_alternative_plan_finding_present, is_miscellaneous_finding_present, is_error_finding_present, is_timeout_finding_present].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
350 351 352 353 354 355 356 357 358 359 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 350 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
344 345 346 |
# File 'lib/oci/database_management/models/sql_tuning_advisor_task_finding_summary.rb', line 344 def to_s to_hash.to_s end |