Class: OCI::DatabaseManagement::Models::SqlTuningTaskSqlExecutionPlanStep

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb

Overview

A step of a SQL execution plan.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SqlTuningTaskSqlExecutionPlanStep

Initializes the object

Options Hash (attributes):

  • :plan_hash_value (Integer)

    The value to assign to the #plan_hash_value property

  • :step_id (Integer)

    The value to assign to the #step_id property

  • :parent_step_id (Integer)

    The value to assign to the #parent_step_id property

  • :position (Integer)

    The value to assign to the #position property

  • :operation (String)

    The value to assign to the #operation property

  • :options (String)

    The value to assign to the #options property

  • :optimizer_mode (String)

    The value to assign to the #optimizer_mode property

  • :cost (Float)

    The value to assign to the #cost property

  • :cardinality (Integer)

    The value to assign to the #cardinality property

  • :bytes (Integer)

    The value to assign to the #bytes property

  • :cpu_cost (Float)

    The value to assign to the #cpu_cost property

  • :io_cost (Float)

    The value to assign to the #io_cost property

  • :temp_space (Integer)

    The value to assign to the #temp_space property

  • :time (Integer)

    The value to assign to the #time property

  • :object_node (String)

    The value to assign to the #object_node property

  • :object_owner (String)

    The value to assign to the #object_owner property

  • :object_name (String)

    The value to assign to the #object_name property

  • :object_position (Integer)

    The value to assign to the #object_position property

  • :object_type (String)

    The value to assign to the #object_type property

  • :partition_start (String)

    The value to assign to the #partition_start property

  • :partition_stop (String)

    The value to assign to the #partition_stop property

  • :partition_id (Integer)

    The value to assign to the #partition_id property

  • :remarks (String)

    The value to assign to the #remarks property

  • :number_of_search_column (Integer)

    The value to assign to the #number_of_search_column property

  • :other (String)

    The value to assign to the #other property

  • :other_tag (String)

    The value to assign to the #other_tag property

  • :attribute (String)

    The value to assign to the #attribute property

  • :access_predicates (String)

    The value to assign to the #access_predicates property

  • :filter_predicates (String)

    The value to assign to the #filter_predicates property

Parameters:

  • (defaults to: {})

    Model attributes in the form of hash



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 249

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_hash_value = attributes[:'planHashValue'] if attributes[:'planHashValue']

  raise 'You cannot provide both :planHashValue and :plan_hash_value' if attributes.key?(:'planHashValue') && attributes.key?(:'plan_hash_value')

  self.plan_hash_value = attributes[:'plan_hash_value'] if attributes[:'plan_hash_value']

  self.step_id = attributes[:'stepId'] if attributes[:'stepId']

  raise 'You cannot provide both :stepId and :step_id' if attributes.key?(:'stepId') && attributes.key?(:'step_id')

  self.step_id = attributes[:'step_id'] if attributes[:'step_id']

  self.parent_step_id = attributes[:'parentStepId'] if attributes[:'parentStepId']

  raise 'You cannot provide both :parentStepId and :parent_step_id' if attributes.key?(:'parentStepId') && attributes.key?(:'parent_step_id')

  self.parent_step_id = attributes[:'parent_step_id'] if attributes[:'parent_step_id']

  self.position = attributes[:'position'] if attributes[:'position']

  self.operation = attributes[:'operation'] if attributes[:'operation']

  self.options = attributes[:'options'] if attributes[:'options']

  self.optimizer_mode = attributes[:'optimizerMode'] if attributes[:'optimizerMode']

  raise 'You cannot provide both :optimizerMode and :optimizer_mode' if attributes.key?(:'optimizerMode') && attributes.key?(:'optimizer_mode')

  self.optimizer_mode = attributes[:'optimizer_mode'] if attributes[:'optimizer_mode']

  self.cost = attributes[:'cost'] if attributes[:'cost']

  self.cardinality = attributes[:'cardinality'] if attributes[:'cardinality']

  self.bytes = attributes[:'bytes'] if attributes[:'bytes']

  self.cpu_cost = attributes[:'cpuCost'] if attributes[:'cpuCost']

  raise 'You cannot provide both :cpuCost and :cpu_cost' if attributes.key?(:'cpuCost') && attributes.key?(:'cpu_cost')

  self.cpu_cost = attributes[:'cpu_cost'] if attributes[:'cpu_cost']

  self.io_cost = attributes[:'ioCost'] if attributes[:'ioCost']

  raise 'You cannot provide both :ioCost and :io_cost' if attributes.key?(:'ioCost') && attributes.key?(:'io_cost')

  self.io_cost = attributes[:'io_cost'] if attributes[:'io_cost']

  self.temp_space = attributes[:'tempSpace'] if attributes[:'tempSpace']

  raise 'You cannot provide both :tempSpace and :temp_space' if attributes.key?(:'tempSpace') && attributes.key?(:'temp_space')

  self.temp_space = attributes[:'temp_space'] if attributes[:'temp_space']

  self.time = attributes[:'time'] if attributes[:'time']

  self.object_node = attributes[:'objectNode'] if attributes[:'objectNode']

  raise 'You cannot provide both :objectNode and :object_node' if attributes.key?(:'objectNode') && attributes.key?(:'object_node')

  self.object_node = attributes[:'object_node'] if attributes[:'object_node']

  self.object_owner = attributes[:'objectOwner'] if attributes[:'objectOwner']

  raise 'You cannot provide both :objectOwner and :object_owner' if attributes.key?(:'objectOwner') && attributes.key?(:'object_owner')

  self.object_owner = attributes[:'object_owner'] if attributes[:'object_owner']

  self.object_name = attributes[:'objectName'] if attributes[:'objectName']

  raise 'You cannot provide both :objectName and :object_name' if attributes.key?(:'objectName') && attributes.key?(:'object_name')

  self.object_name = attributes[:'object_name'] if attributes[:'object_name']

  self.object_position = attributes[:'objectPosition'] if attributes[:'objectPosition']

  raise 'You cannot provide both :objectPosition and :object_position' if attributes.key?(:'objectPosition') && attributes.key?(:'object_position')

  self.object_position = attributes[:'object_position'] if attributes[:'object_position']

  self.object_type = attributes[:'objectType'] if attributes[:'objectType']

  raise 'You cannot provide both :objectType and :object_type' if attributes.key?(:'objectType') && attributes.key?(:'object_type')

  self.object_type = attributes[:'object_type'] if attributes[:'object_type']

  self.partition_start = attributes[:'partitionStart'] if attributes[:'partitionStart']

  raise 'You cannot provide both :partitionStart and :partition_start' if attributes.key?(:'partitionStart') && attributes.key?(:'partition_start')

  self.partition_start = attributes[:'partition_start'] if attributes[:'partition_start']

  self.partition_stop = attributes[:'partitionStop'] if attributes[:'partitionStop']

  raise 'You cannot provide both :partitionStop and :partition_stop' if attributes.key?(:'partitionStop') && attributes.key?(:'partition_stop')

  self.partition_stop = attributes[:'partition_stop'] if attributes[:'partition_stop']

  self.partition_id = attributes[:'partitionId'] if attributes[:'partitionId']

  raise 'You cannot provide both :partitionId and :partition_id' if attributes.key?(:'partitionId') && attributes.key?(:'partition_id')

  self.partition_id = attributes[:'partition_id'] if attributes[:'partition_id']

  self.remarks = attributes[:'remarks'] if attributes[:'remarks']

  self.number_of_search_column = attributes[:'numberOfSearchColumn'] if attributes[:'numberOfSearchColumn']

  raise 'You cannot provide both :numberOfSearchColumn and :number_of_search_column' if attributes.key?(:'numberOfSearchColumn') && attributes.key?(:'number_of_search_column')

  self.number_of_search_column = attributes[:'number_of_search_column'] if attributes[:'number_of_search_column']

  self.other = attributes[:'other'] if attributes[:'other']

  self.other_tag = attributes[:'otherTag'] if attributes[:'otherTag']

  raise 'You cannot provide both :otherTag and :other_tag' if attributes.key?(:'otherTag') && attributes.key?(:'other_tag')

  self.other_tag = attributes[:'other_tag'] if attributes[:'other_tag']

  self.attribute = attributes[:'attribute'] if attributes[:'attribute']

  self.access_predicates = attributes[:'accessPredicates'] if attributes[:'accessPredicates']

  raise 'You cannot provide both :accessPredicates and :access_predicates' if attributes.key?(:'accessPredicates') && attributes.key?(:'access_predicates')

  self.access_predicates = attributes[:'access_predicates'] if attributes[:'access_predicates']

  self.filter_predicates = attributes[:'filterPredicates'] if attributes[:'filterPredicates']

  raise 'You cannot provide both :filterPredicates and :filter_predicates' if attributes.key?(:'filterPredicates') && attributes.key?(:'filter_predicates')

  self.filter_predicates = attributes[:'filter_predicates'] if attributes[:'filter_predicates']
end

Instance Attribute Details

#access_predicatesString

Predicates used to locate rows in an access structure. For example, start or stop predicates for an index range scan.

Returns:



134
135
136
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 134

def access_predicates
  @access_predicates
end

#attributeString

Text string identifying the type of the execution plan.

Returns:



128
129
130
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 128

def attribute
  @attribute
end

#bytesInteger

Number of bytes returned by the current operation.

Returns:



52
53
54
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 52

def bytes
  @bytes
end

#cardinalityInteger

Number of rows returned by the current operation (estimated by the CBO).

Returns:



48
49
50
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 48

def cardinality
  @cardinality
end

#costFloat

Cost of the current operation estimated by the cost-based optimizer (CBO).

Returns:



44
45
46
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 44

def cost
  @cost
end

#cpu_costFloat

The CPU cost of the current operation.

Returns:



56
57
58
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 56

def cpu_cost
  @cpu_cost
end

#filter_predicatesString

Predicates used to filter rows before producing them.

Returns:



138
139
140
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 138

def filter_predicates
  @filter_predicates
end

#io_costFloat

The I/O cost of the current operation.

Returns:



60
61
62
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 60

def io_cost
  @io_cost
end

#number_of_search_columnInteger

Number of index columns with start and stop keys (that is, the number of columns with matching predicates)

Returns:



116
117
118
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 116

def number_of_search_column
  @number_of_search_column
end

#object_nameString

Name of the object.

Returns:



80
81
82
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 80

def object_name
  @object_name
end

#object_nodeString

Name of the database link used to reference the object.

Returns:



72
73
74
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 72

def object_node
  @object_node
end

#object_ownerString

Owner of the object.

Returns:



76
77
78
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 76

def object_owner
  @object_owner
end

#object_positionInteger

Numbered position of the object name in the original SQL statement.

Returns:



84
85
86
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 84

def object_position
  @object_position
end

#object_typeString

Descriptive modifier that further describes the type of object.

Returns:



88
89
90
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 88

def object_type
  @object_type
end

#operationString

Name of the operation performed at this step

Returns:



32
33
34
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 32

def operation
  @operation
end

#optimizer_modeString

Current mode of the optimizer, such as all_rows, first_rows_n (where n = 1, 10, 100, 1000 etc).

Returns:



40
41
42
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 40

def optimizer_mode
  @optimizer_mode
end

#optionsString

Options used for the operation performed at this step.

Returns:



36
37
38
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 36

def options
  @options
end

#otherString

Information about parallel execution servers and parallel queries

Returns:



120
121
122
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 120

def other
  @other
end

#other_tagString

Describes the function of the SQL text in the OTHER column.

Returns:



124
125
126
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 124

def other_tag
  @other_tag
end

#parent_step_idInteger

ID of the next step that operates on the results of this step. It is not the [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

Returns:



24
25
26
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 24

def parent_step_id
  @parent_step_id
end

#partition_idInteger

The id of the step in the execution plan that has computed the pair of values of the partitionStart and partitionStop

Returns:



107
108
109
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 107

def partition_id
  @partition_id
end

#partition_startString

A step may get data from a range of partitions of a partitioned object, such table or index, based on predicates and sorting order. The partionStart is the starting partition of the range. The partitionStop is the ending partition of the range

Returns:



95
96
97
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 95

def partition_start
  @partition_start
end

#partition_stopString

A step may get data from a range of partitions of a partitioned object, such table or index, based on predicates and sorting order. The partionStart is the starting partition of the range. The partitionStop is the ending partition of the range

Returns:



102
103
104
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 102

def partition_stop
  @partition_stop
end

#plan_hash_valueInteger

Numerical representation of the execution plan

Returns:



12
13
14
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 12

def plan_hash_value
  @plan_hash_value
end

#positionInteger

Order of processing for steps with the same parent ID.

Returns:



28
29
30
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 28

def position
  @position
end

#remarksString

Place for comments that can be added to the steps of the execution plan.

Returns:



111
112
113
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 111

def remarks
  @remarks
end

#step_idInteger

Identification number for this step in the execution plan. It is unique within the execution plan. It is not the [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).

Returns:



18
19
20
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 18

def step_id
  @step_id
end

#temp_spaceInteger

Temporary space usage (in bytes) of the operation (sort or hash-join) as estimated by the CBO.

Returns:



64
65
66
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 64

def temp_space
  @temp_space
end

#timeInteger

Elapsed time (in seconds) of the operation as estimated by the CBO.

Returns:



68
69
70
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 68

def time
  @time
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 141

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'plan_hash_value': :'planHashValue',
    'step_id': :'stepId',
    'parent_step_id': :'parentStepId',
    'position': :'position',
    'operation': :'operation',
    'options': :'options',
    'optimizer_mode': :'optimizerMode',
    'cost': :'cost',
    'cardinality': :'cardinality',
    'bytes': :'bytes',
    'cpu_cost': :'cpuCost',
    'io_cost': :'ioCost',
    'temp_space': :'tempSpace',
    'time': :'time',
    'object_node': :'objectNode',
    'object_owner': :'objectOwner',
    'object_name': :'objectName',
    'object_position': :'objectPosition',
    'object_type': :'objectType',
    'partition_start': :'partitionStart',
    'partition_stop': :'partitionStop',
    'partition_id': :'partitionId',
    'remarks': :'remarks',
    'number_of_search_column': :'numberOfSearchColumn',
    'other': :'other',
    'other_tag': :'otherTag',
    'attribute': :'attribute',
    'access_predicates': :'accessPredicates',
    'filter_predicates': :'filterPredicates'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 178

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'plan_hash_value': :'Integer',
    'step_id': :'Integer',
    'parent_step_id': :'Integer',
    'position': :'Integer',
    'operation': :'String',
    'options': :'String',
    'optimizer_mode': :'String',
    'cost': :'Float',
    'cardinality': :'Integer',
    'bytes': :'Integer',
    'cpu_cost': :'Float',
    'io_cost': :'Float',
    'temp_space': :'Integer',
    'time': :'Integer',
    'object_node': :'String',
    'object_owner': :'String',
    'object_name': :'String',
    'object_position': :'Integer',
    'object_type': :'String',
    'partition_start': :'String',
    'partition_stop': :'String',
    'partition_id': :'Integer',
    'remarks': :'String',
    'number_of_search_column': :'Integer',
    'other': :'String',
    'other_tag': :'String',
    'attribute': :'String',
    'access_predicates': :'String',
    'filter_predicates': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • the other object to be compared



397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 397

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    plan_hash_value == other.plan_hash_value &&
    step_id == other.step_id &&
    parent_step_id == other.parent_step_id &&
    position == other.position &&
    operation == other.operation &&
    options == other.options &&
    optimizer_mode == other.optimizer_mode &&
    cost == other.cost &&
    cardinality == other.cardinality &&
    bytes == other.bytes &&
    cpu_cost == other.cpu_cost &&
    io_cost == other.io_cost &&
    temp_space == other.temp_space &&
    time == other.time &&
    object_node == other.object_node &&
    object_owner == other.object_owner &&
    object_name == other.object_name &&
    object_position == other.object_position &&
    object_type == other.object_type &&
    partition_start == other.partition_start &&
    partition_stop == other.partition_stop &&
    partition_id == other.partition_id &&
    remarks == other.remarks &&
    number_of_search_column == other.number_of_search_column &&
    other == other.other &&
    other_tag == other.other_tag &&
    attribute == other.attribute &&
    access_predicates == other.access_predicates &&
    filter_predicates == other.filter_predicates
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • Model attributes in the form of hash

Returns:

  • Returns the model itself



455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 455

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

See Also:

  • `==` method

Parameters:

  • the other object to be compared

Returns:



435
436
437
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 435

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • Hash code



444
445
446
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 444

def hash
  [plan_hash_value, step_id, parent_step_id, position, operation, options, optimizer_mode, cost, cardinality, bytes, cpu_cost, io_cost, temp_space, time, object_node, object_owner, object_name, object_position, object_type, partition_start, partition_stop, partition_id, remarks, number_of_search_column, other, other_tag, attribute, access_predicates, filter_predicates].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • Returns the object in the form of hash



488
489
490
491
492
493
494
495
496
497
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 488

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_sString

Returns the string representation of the object

Returns:

  • String presentation of the object



482
483
484
# File 'lib/oci/database_management/models/sql_tuning_task_sql_execution_plan_step.rb', line 482

def to_s
  to_hash.to_s
end