Send feedback
Class QueryAdvisorResult.IndexAdvice.Builder (6.107.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version latestkeyboard_arrow_down
public static final class QueryAdvisorResult . IndexAdvice . Builder extends GeneratedMessageV3 . Builder<QueryAdvisorResult . IndexAdvice . Builder > implements QueryAdvisorResult . IndexAdviceOrBuilder
Recommendation to add new indexes to run queries more efficiently.
Protobuf type google.spanner.v1.QueryAdvisorResult.IndexAdvice
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Methods
addAllDdl(Iterable<String> values)
public QueryAdvisorResult . IndexAdvice . Builder addAllDdl ( Iterable<String> values )
Optional. DDL statements to add new indexes that will improve the query.
repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL];
addDdl(String value)
public QueryAdvisorResult . IndexAdvice . Builder addDdl ( String value )
Optional. DDL statements to add new indexes that will improve the query.
repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter
Name
Description
value
String The ddl to add.
addDdlBytes(ByteString value)
public QueryAdvisorResult . IndexAdvice . Builder addDdlBytes ( ByteString value )
Optional. DDL statements to add new indexes that will improve the query.
repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter
Name
Description
value
ByteString The bytes of the ddl to add.
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public QueryAdvisorResult . IndexAdvice . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Overrides
build()
public QueryAdvisorResult . IndexAdvice build ()
buildPartial()
public QueryAdvisorResult . IndexAdvice buildPartial ()
clear()
public QueryAdvisorResult . IndexAdvice . Builder clear ()
Overrides
clearDdl()
public QueryAdvisorResult . IndexAdvice . Builder clearDdl ()
Optional. DDL statements to add new indexes that will improve the query.
repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL];
clearField(Descriptors.FieldDescriptor field)
public QueryAdvisorResult . IndexAdvice . Builder clearField ( Descriptors . FieldDescriptor field )
Overrides
clearImprovementFactor()
public QueryAdvisorResult . IndexAdvice . Builder clearImprovementFactor ()
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.
double improvement_factor = 2 [(.google.api.field_behavior) = OPTIONAL];
clearOneof(Descriptors.OneofDescriptor oneof)
public QueryAdvisorResult . IndexAdvice . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Overrides
clone()
public QueryAdvisorResult . IndexAdvice . Builder clone ()
Overrides
getDdl(int index)
public String getDdl ( int index )
Optional. DDL statements to add new indexes that will improve the query.
repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter
Name
Description
index
int The index of the element to return.
Returns
Type
Description
String
The ddl at the given index.
getDdlBytes(int index)
public ByteString getDdlBytes ( int index )
Optional. DDL statements to add new indexes that will improve the query.
repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter
Name
Description
index
int The index of the value to return.
Returns
Type
Description
ByteString
The bytes of the ddl at the given index.
getDdlCount()
Optional. DDL statements to add new indexes that will improve the query.
repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
int
The count of ddl.
getDdlList()
public ProtocolStringList getDdlList ()
Optional. DDL statements to add new indexes that will improve the query.
repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL];
getDefaultInstanceForType()
public QueryAdvisorResult . IndexAdvice getDefaultInstanceForType ()
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Overrides
getImprovementFactor()
public double getImprovementFactor ()
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.
double improvement_factor = 2 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type
Description
double
The improvementFactor.
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
public QueryAdvisorResult . IndexAdvice . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Overrides
mergeFrom(Message other)
public QueryAdvisorResult . IndexAdvice . Builder mergeFrom ( Message other )
Parameter
Name
Description
other
Message
Overrides
mergeFrom(QueryAdvisorResult.IndexAdvice other)
public QueryAdvisorResult . IndexAdvice . Builder mergeFrom ( QueryAdvisorResult . IndexAdvice other )
mergeUnknownFields(UnknownFieldSet unknownFields)
public final QueryAdvisorResult . IndexAdvice . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Overrides
setDdl(int index, String value)
public QueryAdvisorResult . IndexAdvice . Builder setDdl ( int index , String value )
Optional. DDL statements to add new indexes that will improve the query.
repeated string ddl = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameters
Name
Description
index
int The index to set the value at.
value
String The ddl to set.
setField(Descriptors.FieldDescriptor field, Object value)
public QueryAdvisorResult . IndexAdvice . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Overrides
setImprovementFactor(double value)
public QueryAdvisorResult . IndexAdvice . Builder setImprovementFactor ( double value )
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.
double improvement_factor = 2 [(.google.api.field_behavior) = OPTIONAL];
Parameter
Name
Description
value
double The improvementFactor to set.
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public QueryAdvisorResult . IndexAdvice . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final QueryAdvisorResult . IndexAdvice . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-01-21 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-01-21 UTC."],[],[]]