1
0
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:
Roman Nozdrin 2022-11-10 20:49:08 +03:00 committed by GitHub
commit e71bb49267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.