mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-05-28 13:01:26 +03:00
Merge pull request #2617 from mariadb-corporation/spetrunia-tmp
Add ability to compile against MariaDB with new cost model
This commit is contained in:
commit
e71bb49267
@ -117,6 +117,22 @@ class ha_mcs : public handler
|
||||
return HA_MAX_REC_LENGTH;
|
||||
}
|
||||
|
||||
#ifdef MARIADB_NEW_COST_MODEL
|
||||
/** @brief
|
||||
Called in test_quick_select to determine if indexes should be used.
|
||||
*/
|
||||
virtual IO_AND_CPU_COST scan_time() override
|
||||
{
|
||||
IO_AND_CPU_COST cost;
|
||||
cost.io= 0.0;
|
||||
/*
|
||||
For now, assume all cost is CPU cost.
|
||||
The numbers are also very inadequate for the new cost model.
|
||||
*/
|
||||
cost.cpu= (double)(stats.records + stats.deleted) / 20.0 + 10;
|
||||
return cost;
|
||||
}
|
||||
#else
|
||||
/** @brief
|
||||
Called in test_quick_select to determine if indexes should be used.
|
||||
*/
|
||||
@ -124,6 +140,7 @@ class ha_mcs : public handler
|
||||
{
|
||||
return (double)(stats.records + stats.deleted) / 20.0 + 10;
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @brief
|
||||
Analyze table command.
|
||||
|
Loading…
x
Reference in New Issue
Block a user