[MCOL-285] Columnstore is few times slower than InfiniDB for DBT3 query #1 Created: 2016-09-07  Updated: 2016-10-03  Resolved: 2016-10-03

Status: Closed
Project: MariaDB ColumnStore
Component/s: Build
Affects Version/s: None
Fix Version/s: 1.0.4

Type: Bug Priority: Major
Reporter: Daniel Lee (Inactive) Assignee: Andrew Hutchings (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
PartOf
is part of MCOL-280 Beta issues Closed
Sprint: 2016-19

 Description   

Builds tested: InfiniDB 4.6.7-1, ColumnStore 1.0.2-1

Performance comparison shows that ColumnStore is few times slower than InfiniDB, for DBT3 sizes 1gb, 10g, and 100g. The following are some test results using DBT3 test query #1.

Installation: single server (AWS instance m4.4xlarge)
test database: 10gb dbt3
query: dbt3, #1
SELECT
L_RETURNFLAG,
L_LINESTATUS,
SUM(L_QUANTITY) AS SUM_QTY,
SUM(L_EXTENDEDPRICE) AS SUM_BASE_PRICE,
SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)) AS SUM_DISC_PRICE,
SUM(L_EXTENDEDPRICE*(1-L_DISCOUNT)*(1+L_TAX)) AS SUM_CHARGE,
AVG(L_QUANTITY) AS AVG_QTY,
AVG(L_EXTENDEDPRICE) AS AVG_PRICE,
AVG(L_DISCOUNT) AS AVG_DISC,
COUNT AS COUNT_ORDER
FROM
LINEITEM
WHERE
L_SHIPDATE <= date '1998-12-01' - interval '66' day
GROUP BY
L_RETURNFLAG,
L_LINESTATUS
ORDER BY
L_RETURNFLAG,
L_LINESTATUS;

Elapsed time:
InfiniDB 4.6.7-1: diskRun=1.07s cachedRun=0.70s
ColumnStore 1.0.2-1: diskRun=4.34s cachedRun=4.13s
ColoumnStore is 4x and 6x slower, respectively, when compared to InfiniDB

I derived simpler queries from the above queries. Using the calgettrace() function, I found:

1) simple select count query
select COUNT AS COUNT_ORDER FROM LINEITEM;

InfiniDB
Elapsed time: 0.21 sec

calgettrace output:
Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows
BPS PM lineitem 3170 (l_returnflag) 0 7324 0 0.202 7324
TAS UM - - - - - - 0.195 1

ColumnStore
Elapsed time=0.62 sec

calgettrace output:
Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows
BPS PM lineitem 3075 (l_returnflag) 0 7324 0 0.613 7324
TAS UM - - - - - - 0.572 1

Remarks:
ColumnStore took 3x times longer

2) Add filter

select COUNT AS COUNT_ORDER FROM LINEITEM WHERE L_SHIPDATE <= date '1998-12-01' - interval '66' day;

InfiniDB
Elapsed time=0.28 sec

calgettrace output:
Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows
BPS PM lineitem 3170 (l_shipdate) 0 29295 0 0.270 7324
TAS UM - - - - - - 0.246 1

ColumnStore
Elapsed time=0.87 sec

calgettrace output:
Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows
BPS PM lineitem 3075 (l_shipdate) 0 29295 0 0.859 7324
TAS UM - - - - - - 0.846 1

Remarks:
ColumnStore took 3x times longer

3) Add 1 group by column

select COUNT AS COUNT_ORDER FROM LINEITEM WHERE L_SHIPDATE <= date '1998-12-01' - interval '66' day group by l_returnflag;

InfiniDB
Elapsed time=0.71 sec

calgettrace output:
Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows
BPS PM lineitem 3170 (l_returnflag,l_shipdate) 0 36618 0 0.699 366
TAS UM - - - - - - 0.679 3

ColumnStore
Elapsed time=3.41 sec

calgettrace output:
Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows
BPS PM lineitem 3075 (l_returnflag,l_shipdate) 0 36618 0 3.394 21969
TAS UM - - - - - - 3.367 3

Remarks:
ColumnStore returned 60x more rows and took almost 5x longer

4) add 2 group by columns

select COUNT AS COUNT_ORDER FROM LINEITEM WHERE L_SHIPDATE <= date '1998-12-01' - interval '66' day group by l_returnflag, l_linestatus;

InfiniDB
Elapsed time=0.83 sec

calgettrace output:
Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows
BPS PM lineitem 3170 (l_linestatus,l_returnflag,l_shipdate) 0 43941 0 0.822 488
TAS UM - - - - - - 0.794 4

ColumnStore
Elapsed time=3.94 sec

calgettrace output:
Desc Mode Table TableOID ReferencedColumns PIO LIO PBE Elapsed Rows
BPS PM lineitem 3075 (l_linestatus,l_returnflag,l_shipdate) 0 43941 0 3.931 29292
TAS UM - - - - - - 3.902 4

Remarks:
ColumnStore returned 60x more rows and took almost 5x longer



 Comments   
Comment by Dipti Joshi (Inactive) [ 2016-09-07 ]

dleeyh For 3 and 4 - can you run them on InnoDB and validate what is number of rows it returns ? Same as InfiniDB or same as ColumnStore ? Looks like for queries 1 and 2, PM time is same between InfiniDB and ColumnStore. It is on UM in ExecMgr what got changed or in storage engine interface that is impacting the performance.

Comment by Andrew Hutchings (Inactive) [ 2016-09-24 ]

Should no longer be a problem after the fix for MCOL-303

Comment by Andrew Hutchings (Inactive) [ 2016-10-03 ]

Build fixes have resolved this. All of DBT3 runs much faster.

Generated at Thu Feb 08 02:19:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.