func ChangeQueryLimit() {
	qry := fmt.Sprintf("alter database set select_points_limit %d", queryLimit)
	if siridbConnector.IsConnected() {
		if _, err := siridbConnector.Query(qry, uint16(writeTimeout)); err != nil {
			log.Fatal(err)
		}
	} else {
		log.Fatal("not even a single server is connected...")
	}
}
Changes the maximum points which can be returned by a select query. The default
and recommended value is set to one million points. This value is chosen to
prevent a single query for taking to much memory and ensures SiriDB can respond
to almost any query in a reasonable amount of time.
package main
import (
	"fmt"
	"log"
	"strconv"
	"strings"
	"time"
	siridb "github.com/SiriDB/go-siridb-connector"
	"github.com/blagojts/viper"
	_ "github.com/lib/pq"
	"github.com/spf13/pflag"
	"github.com/timescale/tsbs/cmd/tsbs_generate_queries/uses/devops"
	"github.com/timescale/tsbs/internal/utils"
	"github.com/timescale/tsbs/pkg/query"
)
var (
	hosts        string
	writeTimeout int
	dbUser       string
	dbPass       string
	showExplain  bool
	scale        uint64
	queryLimit   uint64
)
var (
	runner *query.BenchmarkRunner
)
var (
	siridbConnector *siridb.Client
)
func init() {
	var config query.BenchmarkRunnerConfig
	config.AddToFlagSet(pflag.CommandLine)
	pflag.String("dbuser", "iris", "Username to enter SiriDB")
	pflag.String("dbpass", "siri", "Password to enter SiriDB")
	pflag.String("hosts", "localhost:9000", "Comma separated list of SiriDB hosts in a cluster.")
	pflag.Uint64("scale", 8, "Scaling variable (Must be the equal to the scalevar used for data generation).")
	pflag.Uint64("query-limit", 1000000, "Changes the maximum points which can be returned by a select query.")
	pflag.Int("write-timeout", 10, "Write timeout.")
	pflag.Bool("show-explain", false, "Print out the EXPLAIN output for sample query")
	pflag.Parse()
	err := utils.SetupConfigFile()
	if err != nil {
		panic(fmt.Errorf("fatal error config file: %s", err))
	}
	if err := viper.Unmarshal(&config); err != nil {
		panic(fmt.Errorf("unable to decode config: %s", err))
	}
	dbUser = viper.GetString("dbuser")
	dbPass = viper.GetString("dbpass")
	hosts = viper.GetString("hosts")
	scale = viper.GetUint64("scale")
	queryLimit = viper.GetUint64("query-limit")
	writeTimeout = viper.GetInt("write-timeout")
	showExplain = viper.GetBool("show-explain")
	runner = query.NewBenchmarkRunner(config)
	if showExplain {
		runner.SetLimit(1)
	}
	hostlist := [][]interface{}{}
	listhosts := strings.Split(hosts, ",")
	for _, hostport := range listhosts {
		x := strings.Split(hostport, ":")
		host := x[0]
		port, err := strconv.ParseInt(x[1], 10, 0)
		if err != nil {
			log.Fatal(err)
		}
		hostlist = append(hostlist, []interface{}{host, int(port)})
	}
	siridbConnector = siridb.NewClient(
		dbUser,                 
		dbPass,                 
		runner.DatabaseName(),  
		hostlist,               
		nil,                    
	)
}
func main() {
	siridbConnector.Connect()
	ChangeQueryLimit()
	CreateGroups()
	runner.Run(&query.SiriDBPool, newProcessor)
	siridbConnector.Close()
}
type queryExecutorOptions struct {
	showExplain   bool
	debug         bool
	printResponse bool
}
type processor struct {
	opts *queryExecutorOptions
}
func newProcessor() query.Processor { return &processor{} }