Class: Google::Apis::SpannerV1::IndexAdvice
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::IndexAdvice
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb
Overview
Recommendation to add new indexes to run queries more efficiently.
Instance Attribute Summary collapse
-
#ddl ⇒ Array<String>
Optional.
-
#improvement_factor ⇒ Float
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ IndexAdvice
constructor
A new instance of IndexAdvice.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ IndexAdvice
Returns a new instance of IndexAdvice.
3041 3042 3043 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3041 def initialize(**args) update!(**args) end |
Instance Attribute Details
#ddl ⇒ Array<String>
Optional. DDL statements to add new indexes that will improve the query.
Corresponds to the JSON property ddl
3032 3033 3034 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3032 def ddl @ddl end |
#improvement_factor ⇒ Float
Optional. Estimated latency improvement factor. For example if the query
currently takes 500 ms to run and the estimated latency with new indexes is
100 ms this field will be 5.
Corresponds to the JSON property improvementFactor
3039 3040 3041 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3039 def improvement_factor @improvement_factor end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3046 3047 3048 3049 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3046 def update!(**args) @ddl = args[:ddl] if args.key?(:ddl) @improvement_factor = args[:improvement_factor] if args.key?(:improvement_factor) end |