diff --git a/server/store/adapters/rdbms/dal/connection.go b/server/store/adapters/rdbms/dal/connection.go index 7c50711b8..b6df31e4a 100644 --- a/server/store/adapters/rdbms/dal/connection.go +++ b/server/store/adapters/rdbms/dal/connection.go @@ -3,9 +3,10 @@ package dal import ( "context" "fmt" - "github.com/cortezaproject/corteza/server/pkg/options" "sync" + "github.com/cortezaproject/corteza/server/pkg/options" + "github.com/cortezaproject/corteza/server/pkg/errors" "github.com/cortezaproject/corteza/server/store/adapters/rdbms/ddl" "github.com/cortezaproject/corteza/server/store/adapters/rdbms/ql" @@ -111,13 +112,21 @@ func (c *connection) Search(ctx context.Context, m *dal.Model, f filter.Filter) func (c *connection) Analyze(ctx context.Context, m *dal.Model) (a map[string]dal.OpAnalysis, err error) { // @todo somehow (probably operations) bring in the info what can be done // for now, since we're quite rigid on the drivers, this will do. - a = map[string]dal.OpAnalysis{ - dal.OpAnalysisAggregate: { - ScanCost: dal.CostCheep, - SearchCost: dal.CostCheep, - FilterCost: dal.CostCheep, - SortCost: dal.CostCheep, - }, + // + // @note this is a temporary hack until we properly address the first point. + // No point in complicating it at this stage. + if c.db.DriverName() == "sqlserver" { + a = map[string]dal.OpAnalysis{} + } else { + a = map[string]dal.OpAnalysis{ + dal.OpAnalysisAggregate: { + ScanCost: dal.CostCheep, + SearchCost: dal.CostCheep, + FilterCost: dal.CostCheep, + SortCost: dal.CostCheep, + }, + } + } return