Class: OCI::DatabaseManagement::Models::SqlPlanBaselineSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::SqlPlanBaselineSummary
- Defined in:
- lib/oci/database_management/models/sql_plan_baseline_summary.rb
Overview
The summary of a SQL plan baseline.
Constant Summary collapse
- ORIGIN_ENUM =
[ ORIGIN_ADDM_SQLTUNE = 'ADDM_SQLTUNE'.freeze, ORIGIN_AUTO_CAPTURE = 'AUTO_CAPTURE'.freeze, ORIGIN_AUTO_SQLTUNE = 'AUTO_SQLTUNE'.freeze, ORIGIN_EVOLVE_AUTO_INDEX_LOAD = 'EVOLVE_AUTO_INDEX_LOAD'.freeze, ORIGIN_EVOLVE_CREATE_FROM_ADAPTIVE = 'EVOLVE_CREATE_FROM_ADAPTIVE'.freeze, ORIGIN_EVOLVE_LOAD_FROM_STS = 'EVOLVE_LOAD_FROM_STS'.freeze, ORIGIN_EVOLVE_LOAD_FROM_AWR = 'EVOLVE_LOAD_FROM_AWR'.freeze, ORIGIN_EVOLVE_LOAD_FROM_CURSOR_CACHE = 'EVOLVE_LOAD_FROM_CURSOR_CACHE'.freeze, ORIGIN_MANUAL_LOAD = 'MANUAL_LOAD'.freeze, ORIGIN_MANUAL_LOAD_FROM_AWR = 'MANUAL_LOAD_FROM_AWR'.freeze, ORIGIN_MANUAL_LOAD_FROM_CURSOR_CACHE = 'MANUAL_LOAD_FROM_CURSOR_CACHE'.freeze, ORIGIN_MANUAL_LOAD_FROM_STS = 'MANUAL_LOAD_FROM_STS'.freeze, ORIGIN_MANUAL_SQLTUNE = 'MANUAL_SQLTUNE'.freeze, ORIGIN_STORED_OUTLINE = 'STORED_OUTLINE'.freeze, ORIGIN_UNKNOWN = 'UNKNOWN'.freeze, ORIGIN_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#accepted ⇒ String
Indicates whether the plan baseline is accepted (
YES
) or not (NO
). -
#adaptive ⇒ String
Indicates whether a plan that is automatically captured by SQL plan management is marked adaptive or not.
-
#auto_purge ⇒ String
Indicates whether the plan baseline is auto-purged (
YES
) or not (NO
). -
#enabled ⇒ String
Indicates whether the plan baseline is enabled (
YES
) or disabled (NO
). -
#fixed ⇒ String
Indicates whether the plan baseline is fixed (
YES
) or not (NO
). -
#origin ⇒ String
The origin of the SQL plan baseline.
-
#plan_name ⇒ String
[Required] The unique plan identifier.
-
#reproduced ⇒ String
Indicates whether the optimizer was able to reproduce the plan (
YES
) or not (NO
). -
#sql_handle ⇒ String
[Required] The unique SQL identifier.
-
#sql_text ⇒ String
[Required] The SQL text (truncated to the first 50 characters).
-
#time_created ⇒ DateTime
[Required] The date and time when the plan baseline was created.
-
#time_last_executed ⇒ DateTime
The date and time when the plan baseline was last executed.
-
#time_last_modified ⇒ DateTime
The date and time when the plan baseline was last modified.
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 = {}) ⇒ SqlPlanBaselineSummary
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 = {}) ⇒ SqlPlanBaselineSummary
Initializes the object
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 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 159 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.plan_name = attributes[:'planName'] if attributes[:'planName'] raise 'You cannot provide both :planName and :plan_name' if attributes.key?(:'planName') && attributes.key?(:'plan_name') self.plan_name = attributes[:'plan_name'] if attributes[:'plan_name'] self.sql_handle = attributes[:'sqlHandle'] if attributes[:'sqlHandle'] raise 'You cannot provide both :sqlHandle and :sql_handle' if attributes.key?(:'sqlHandle') && attributes.key?(:'sql_handle') self.sql_handle = attributes[:'sql_handle'] if attributes[:'sql_handle'] 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.origin = attributes[:'origin'] if attributes[:'origin'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_last_modified = attributes[:'timeLastModified'] if attributes[:'timeLastModified'] raise 'You cannot provide both :timeLastModified and :time_last_modified' if attributes.key?(:'timeLastModified') && attributes.key?(:'time_last_modified') self.time_last_modified = attributes[:'time_last_modified'] if attributes[:'time_last_modified'] self.time_last_executed = attributes[:'timeLastExecuted'] if attributes[:'timeLastExecuted'] raise 'You cannot provide both :timeLastExecuted and :time_last_executed' if attributes.key?(:'timeLastExecuted') && attributes.key?(:'time_last_executed') self.time_last_executed = attributes[:'time_last_executed'] if attributes[:'time_last_executed'] self.enabled = attributes[:'enabled'] if attributes[:'enabled'] self.accepted = attributes[:'accepted'] if attributes[:'accepted'] self.fixed = attributes[:'fixed'] if attributes[:'fixed'] self.reproduced = attributes[:'reproduced'] if attributes[:'reproduced'] self.auto_purge = attributes[:'autoPurge'] if attributes[:'autoPurge'] raise 'You cannot provide both :autoPurge and :auto_purge' if attributes.key?(:'autoPurge') && attributes.key?(:'auto_purge') self.auto_purge = attributes[:'auto_purge'] if attributes[:'auto_purge'] self.adaptive = attributes[:'adaptive'] if attributes[:'adaptive'] end |
Instance Attribute Details
#accepted ⇒ String
Indicates whether the plan baseline is accepted (YES
) or not (NO
).
70 71 72 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 70 def accepted @accepted end |
#adaptive ⇒ String
Indicates whether a plan that is automatically captured by SQL plan management is marked adaptive or not.
When a new adaptive plan is found for a SQL statement that has an existing SQL plan baseline, that new plan will be added to the SQL plan baseline as an unaccepted plan, and the ADAPTIVE
property will be marked YES
. When this new plan is verified (either manually or via the auto evolve task), the plan will be test executed and the final plan determined at execution will become an accepted plan if its performance is better than the existing plan baseline. At this point, the value of the ADAPTIVE
property is set to NO
since the plan is no longer adaptive, but resolved.
96 97 98 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 96 def adaptive @adaptive end |
#auto_purge ⇒ String
Indicates whether the plan baseline is auto-purged (YES
) or not (NO
).
84 85 86 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 84 def auto_purge @auto_purge end |
#enabled ⇒ String
Indicates whether the plan baseline is enabled (YES
) or disabled (NO
).
66 67 68 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 66 def enabled @enabled end |
#fixed ⇒ String
Indicates whether the plan baseline is fixed (YES
) or not (NO
).
74 75 76 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 74 def fixed @fixed end |
#origin ⇒ String
The origin of the SQL plan baseline.
45 46 47 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 45 def origin @origin end |
#plan_name ⇒ String
[Required] The unique plan identifier.
33 34 35 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 33 def plan_name @plan_name end |
#reproduced ⇒ String
Indicates whether the optimizer was able to reproduce the plan (YES
) or not (NO
). The value is set to YES
when a plan is initially added to the plan baseline.
80 81 82 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 80 def reproduced @reproduced end |
#sql_handle ⇒ String
[Required] The unique SQL identifier.
37 38 39 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 37 def sql_handle @sql_handle end |
#sql_text ⇒ String
[Required] The SQL text (truncated to the first 50 characters).
41 42 43 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 41 def sql_text @sql_text end |
#time_created ⇒ DateTime
[Required] The date and time when the plan baseline was created.
49 50 51 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 49 def time_created @time_created end |
#time_last_executed ⇒ DateTime
The date and time when the plan baseline was last executed.
Note: For performance reasons, database does not update this value immediately after each execution of the plan baseline. Therefore, the plan baseline may have been executed more recently than this value indicates.
62 63 64 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 62 def time_last_executed @time_last_executed end |
#time_last_modified ⇒ DateTime
The date and time when the plan baseline was last modified.
53 54 55 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 53 def time_last_modified @time_last_modified end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 99 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'plan_name': :'planName', 'sql_handle': :'sqlHandle', 'sql_text': :'sqlText', 'origin': :'origin', 'time_created': :'timeCreated', 'time_last_modified': :'timeLastModified', 'time_last_executed': :'timeLastExecuted', 'enabled': :'enabled', 'accepted': :'accepted', 'fixed': :'fixed', 'reproduced': :'reproduced', 'auto_purge': :'autoPurge', 'adaptive': :'adaptive' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 120 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'plan_name': :'String', 'sql_handle': :'String', 'sql_text': :'String', 'origin': :'String', 'time_created': :'DateTime', 'time_last_modified': :'DateTime', 'time_last_executed': :'DateTime', 'enabled': :'String', 'accepted': :'String', 'fixed': :'String', 'reproduced': :'String', 'auto_purge': :'String', 'adaptive': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 240 def ==(other) return true if equal?(other) self.class == other.class && plan_name == other.plan_name && sql_handle == other.sql_handle && sql_text == other.sql_text && origin == other.origin && time_created == other.time_created && time_last_modified == other.time_last_modified && time_last_executed == other.time_last_executed && enabled == other.enabled && accepted == other.accepted && fixed == other.fixed && reproduced == other.reproduced && auto_purge == other.auto_purge && adaptive == other.adaptive end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 282 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
262 263 264 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 262 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
271 272 273 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 271 def hash [plan_name, sql_handle, sql_text, origin, time_created, time_last_modified, time_last_executed, enabled, accepted, fixed, reproduced, auto_purge, adaptive].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
315 316 317 318 319 320 321 322 323 324 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 315 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
309 310 311 |
# File 'lib/oci/database_management/models/sql_plan_baseline_summary.rb', line 309 def to_s to_hash.to_s end |