August 2024 – ad hoc analysis

Work in progress. DataFusion and Polars have both had new releases. DataFusion via Ibis now completes on all queries.

Versions used

Versions used in this analysis:

  • ibis-framework @ git+https://github.com/ibis-project/ibis
  • duckdb==1.0.0
  • datafusion==40.1.0
  • polars==1.5.0
import ibis
import gcsfs
import ibis.selectors as s
import plotly.express as px

ibis.options.interactive = True
ibis.options.repr.interactive.max_rows = 40
ibis.options.repr.interactive.max_length = 22
ibis.options.repr.interactive.max_columns = None

px.defaults.template = "plotly_dark"

fs = gcsfs.GCSFileSystem()
ibis.get_backend().register_filesystem(fs)
def get_t(floats=False):
    t = (
        ibis.read_parquet("gs://ibis-bench/adhoc/2024-08-23/cache/file_id=*.parquet")
        .mutate(
            timestamp=ibis._["timestamp"].cast("timestamp"),
            instance_type=ibis.literal("MacBook Pro (2021 Apple M1 Max 32GB)"),
        )
        .filter(ibis._["floats"] == floats)
        .distinct()
        .cache()
    )
    return t
def get_sfs(t):
    sfs = sorted(t.distinct(on="sf")["sf"].to_pyarrow().to_pylist())
    return sfs
def get_systems(t):
    systems = sorted(t.distinct(on="system")["system"].to_pyarrow().to_pylist())
    return systems
def get_instance_types(t):
    instance_types = sorted(
        t.distinct(on="instance_type")["instance_type"].to_pyarrow().to_pylist(),
        key=lambda x: (x.split("-")[0], int(x.split("-")[-1])) if "-" in x else (x, 0),
    )
    return instance_types
def get_query_numbers(t):
    query_numbers = sorted(
        t.distinct(on="query_number")["query_number"].to_pyarrow().to_pylist()
    )
    return query_numbers
def get_failing_queries(t):
    fail = t.group_by("system", "sf", "floats").agg(
        present_queries=ibis._["query_number"].collect().unique().sort()
    )
    fail = (
        fail.mutate(
            failing_queries=t.distinct(on="query_number")["query_number"]
            .collect()
            .filter(lambda x: ~fail["present_queries"].contains(x))
            .sort()
        )
        .mutate(num_failing_queries=ibis._["failing_queries"].length())
        .drop("present_queries")
        .order_by(ibis.desc("sf"), "system")
    )
    return fail
def get_agg(t):
    agg = (
        t.filter(t["sf"] >= 1)
        # .filter((t["system"].contains("duckdb")) | (t["system"].contains("datafusion")))
        .group_by("instance_type", "system", "sf", "n_partitions", "query_number")
        .agg(
            mean_execution_seconds=t["execution_seconds"].mean(),
        )
        .order_by(
            ibis.asc("instance_type"),
            ibis.desc("sf"),
            ibis.asc("n_partitions"),
            ibis.asc("query_number"),
            ibis.desc("system"),
            ibis.asc("mean_execution_seconds"),
        )
    )
    return agg
def get_totals(t):
    totals = (
        agg.filter(agg["sf"] >= 1)
        .group_by("system", "sf")
        .agg(total_execution_seconds=agg["mean_execution_seconds"].sum())
        .order_by(
            ibis.desc("sf"), ibis.desc("system"), ibis.desc("total_execution_seconds")
        )
    )
    return totals
def get_category_orders(t):
    category_orders = {
        "query_number": sorted(
            agg.select("query_number").distinct().to_pandas()["query_number"].tolist()
        ),
        "system": sorted(
            agg.select("system").distinct().to_pandas()["system"].tolist()
        ),
        "instance_type": sorted(
            agg.select("instance_type")
            .distinct()
            .to_pandas()["instance_type"]
            .tolist(),
            key=lambda x: (x.split("-")[0], int(x.split("-")[-1]))
            if "-" in x
            else (x, 0),
        ),
    }
    return category_orders
def totals_line(totals, log_y=False):
    px.line(
        totals.mutate(sf=ibis._["sf"].log2()),
        x="sf",
        y="total_execution_seconds",
        color="system",
        hover_name="system",
        markers=True,
        log_y=log_y,
        title="total execution time by scale factor",
        labels={"sf": "log2(sf)"},
        category_orders=category_orders,
    ).show()
def queries_bar(agg, sfs, category_orders):
    for sf in sorted(sfs):
        c = px.bar(
            agg.filter(agg["sf"] == sf).filter(
                agg["instance_type"].lower().contains("macbook")
            ),
            x="query_number",
            y="mean_execution_seconds",
            color="system",
            barmode="group",
            log_y=True,
            # pattern_shape="instance_type",
            category_orders=category_orders,
            title=f"TPC-H scale factor {sf} (~{sf} GB in memory; ~{sf*2//5}GB on disk in Parquet) on MacBook Pro (2021 Apple M1 Max 32GB)",
        )
        c.update_layout(
            legend=dict(orientation="h", yanchor="top", y=1.02, xanchor="right", x=1)
        )
        c.show()
        print()

Decimals (original TPC-H data)

t = get_t()
t.head()
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ session_id                            instance_type                         system           timestamp                   sf     n_partitions  query_number  execution_seconds  file_type  floats   file_id                                      ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ uuidstringstringtimestamp(6)int64int64int64float64stringbooleanstring                                       │
├──────────────────────────────────────┼──────────────────────────────────────┼─────────────────┼────────────────────────────┼───────┼──────────────┼──────────────┼───────────────────┼───────────┼─────────┼──────────────────────────────────────────────┤
│ ca05e319-6b56-459a-81e2-196d14173351 │ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion2024-08-23 12:25:44.2931454170.469318parquet   │ False   │ 7c420182-f1a7-4631-b810-b75163ed6100.parquet │
│ ca05e319-6b56-459a-81e2-196d14173351 │ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    2024-08-23 12:25:34.2367462160.049360parquet   │ False   │ 7c420182-f1a7-4631-b810-b75163ed6100.parquet │
│ ca05e319-6b56-459a-81e2-196d14173351 │ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion2024-08-23 12:26:21.83506581220.130533parquet   │ False   │ 7c420182-f1a7-4631-b810-b75163ed6100.parquet │
│ ca05e319-6b56-459a-81e2-196d14173351 │ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    2024-08-23 12:25:21.50772111210.174379parquet   │ False   │ 7c420182-f1a7-4631-b810-b75163ed6100.parquet │
│ ca05e319-6b56-459a-81e2-196d14173351 │ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion2024-08-23 12:28:46.24766532120.382871parquet   │ False   │ 7c420182-f1a7-4631-b810-b75163ed6100.parquet │
└──────────────────────────────────────┴──────────────────────────────────────┴─────────────────┴────────────────────────────┴───────┴──────────────┴──────────────┴───────────────────┴───────────┴─────────┴──────────────────────────────────────────────┘
sfs = get_sfs(t)
sfs
[1, 2, 4, 8, 16, 32, 64, 128]
systems = get_systems(t)
systems
['ibis-datafusion', 'ibis-duckdb', 'polars-lazy']
instance_types = get_instance_types(t)
instance_types
['MacBook Pro (2021 Apple M1 Max 32GB)']
query_numbers = get_query_numbers(t)
query_numbers
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]
fail = get_failing_queries(t)
fail
┏━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
┃ system           sf     floats   failing_queries                     num_failing_queries ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩
│ stringint64booleanarray<int64>int64               │
├─────────────────┼───────┼─────────┼────────────────────────────────────┼─────────────────────┤
│ ibis-datafusion128 │ False   │ []0 │
│ ibis-duckdb    128 │ False   │ []0 │
│ polars-lazy    128 │ False   │ [8, 9, 10, 11, 14, 15, 17, 19, 22]9 │
│ ibis-datafusion64 │ False   │ []0 │
│ ibis-duckdb    64 │ False   │ []0 │
│ polars-lazy    64 │ False   │ [8, 9, 10, 11, 14, 15, 17, 19, 22]9 │
│ ibis-datafusion32 │ False   │ []0 │
│ ibis-duckdb    32 │ False   │ []0 │
│ polars-lazy    32 │ False   │ [8, 9, 10, 11, 14, 15, 17, 19, 22]9 │
│ ibis-datafusion16 │ False   │ []0 │
│ ibis-duckdb    16 │ False   │ []0 │
│ polars-lazy    16 │ False   │ [8, 9, 10, 11, 14, 15, 17, 19, 22]9 │
│ ibis-datafusion8 │ False   │ []0 │
│ ibis-duckdb    8 │ False   │ []0 │
│ polars-lazy    8 │ False   │ [8, 9, 10, 11, 14, 15, 17, 19, 22]9 │
│ ibis-datafusion4 │ False   │ []0 │
│ ibis-duckdb    4 │ False   │ []0 │
│ polars-lazy    4 │ False   │ [8, 9, 10, 11, 14, 15, 17, 19, 22]9 │
│ ibis-datafusion2 │ False   │ []0 │
│ ibis-duckdb    2 │ False   │ []0 │
│ polars-lazy    2 │ False   │ [8, 9, 10, 11, 14, 15, 17, 19, 22]9 │
│ ibis-datafusion1 │ False   │ []0 │
│ ibis-duckdb    1 │ False   │ []0 │
│ polars-lazy    1 │ False   │ [8, 9, 10, 11, 14, 15, 17, 19, 22]9 │
└─────────────────┴───────┴─────────┴────────────────────────────────────┴─────────────────────┘
agg = get_agg(t)
agg
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ instance_type                         system           sf     n_partitions  query_number  mean_execution_seconds ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
│ stringstringint64int64int64float64                │
├──────────────────────────────────────┼─────────────────┼───────┼──────────────┼──────────────┼────────────────────────┤
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    12811272.486370 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281111.606048 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion1281115.757316 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    128122.347797 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    128121.279553 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion128121.477171 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    1281327.181227 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    128138.333445 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion128137.530144 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    1281411.403273 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    128146.026812 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion128146.528712 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    1281540.171489 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    128158.683080 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion128159.051882 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    128168.230003 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    128167.061977 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion128164.492152 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    1281723.795136 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281717.664108 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion1281714.404383 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281810.597529 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion1281812.206576 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281916.954887 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion12819145.980012 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281109.018888 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion12811012.127219 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281111.597982 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion1281112.703022 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    12811212.266083 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281129.183415 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion12811210.053736 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    12811354.599441 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281136.959909 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion1281137.707117 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281147.155558 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion1281148.676409 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    12811512.765408 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion12811515.083847 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    1281161.555730 │
│  │
└──────────────────────────────────────┴─────────────────┴───────┴──────────────┴──────────────┴────────────────────────┘
totals = get_totals(t)
totals
┏━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ system           sf     total_execution_seconds ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ stringint64float64                 │
├─────────────────┼───────┼─────────────────────────┤
│ polars-lazy    1281350.187780 │
│ ibis-duckdb    128223.264220 │
│ ibis-datafusion128401.521348 │
│ polars-lazy    64176.923297 │
│ ibis-duckdb    6498.655552 │
│ ibis-datafusion64133.822870 │
│ polars-lazy    3262.012707 │
│ ibis-duckdb    3243.631367 │
│ ibis-datafusion3260.327710 │
│ polars-lazy    1621.389563 │
│ ibis-duckdb    1622.242419 │
│ ibis-datafusion1630.334133 │
│ polars-lazy    88.962351 │
│ ibis-duckdb    811.322597 │
│ ibis-datafusion814.689493 │
│ polars-lazy    44.202529 │
│ ibis-duckdb    45.948022 │
│ ibis-datafusion47.150409 │
│ polars-lazy    22.124277 │
│ ibis-duckdb    23.491531 │
│ ibis-datafusion23.933485 │
│ polars-lazy    11.175853 │
│ ibis-duckdb    12.304713 │
│ ibis-datafusion12.529810 │
└─────────────────┴───────┴─────────────────────────┘
category_orders = get_category_orders(t)
totals_line(totals)
totals_line(totals, log_y=True)
queries_bar(agg, sfs, category_orders)

Floats (TPC-H data with decimals casted to floats)

t = get_t(floats=True)
t.head()
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ session_id                            instance_type                         system           timestamp                   sf     n_partitions  query_number  execution_seconds  file_type  floats   file_id                                      ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ uuidstringstringtimestamp(6)int64int64int64float64stringbooleanstring                                       │
├──────────────────────────────────────┼──────────────────────────────────────┼─────────────────┼────────────────────────────┼───────┼──────────────┼──────────────┼───────────────────┼───────────┼─────────┼──────────────────────────────────────────────┤
│ 770c123f-24cc-4f59-a19a-1bb61f50ffec │ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    2024-08-23 13:19:23.9350708160.356593parquet   │ True    │ 7c420182-f1a7-4631-b810-b75163ed6100.parquet │
│ 770c123f-24cc-4f59-a19a-1bb61f50ffec │ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion2024-08-23 13:18:56.3412102180.214526parquet   │ True    │ 7c420182-f1a7-4631-b810-b75163ed6100.parquet │
│ 770c123f-24cc-4f59-a19a-1bb61f50ffec │ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion2024-08-23 13:19:09.5253564150.294797parquet   │ True    │ 7c420182-f1a7-4631-b810-b75163ed6100.parquet │
│ 770c123f-24cc-4f59-a19a-1bb61f50ffec │ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    2024-08-23 13:19:06.42894041170.293237parquet   │ True    │ 7c420182-f1a7-4631-b810-b75163ed6100.parquet │
│ 770c123f-24cc-4f59-a19a-1bb61f50ffec │ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    2024-08-23 13:33:39.204966641144.779252parquet   │ True    │ 7c420182-f1a7-4631-b810-b75163ed6100.parquet │
└──────────────────────────────────────┴──────────────────────────────────────┴─────────────────┴────────────────────────────┴───────┴──────────────┴──────────────┴───────────────────┴───────────┴─────────┴──────────────────────────────────────────────┘
sfs = get_sfs(t)
sfs
[1, 2, 4, 8, 16, 32, 64, 128]
systems = get_systems(t)
systems
['ibis-datafusion', 'ibis-duckdb', 'polars-lazy']
instance_types = get_instance_types(t)
instance_types
['MacBook Pro (2021 Apple M1 Max 32GB)']
query_numbers = get_query_numbers(t)
query_numbers
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]
fail = get_failing_queries(t)
fail
┏━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
┃ system           sf     floats   failing_queries  num_failing_queries ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩
│ stringint64booleanarray<int64>int64               │
├─────────────────┼───────┼─────────┼─────────────────┼─────────────────────┤
│ ibis-datafusion128 │ True    │ []0 │
│ ibis-duckdb    128 │ True    │ []0 │
│ polars-lazy    128 │ True    │ [9]1 │
│ ibis-datafusion64 │ True    │ []0 │
│ ibis-duckdb    64 │ True    │ []0 │
│ polars-lazy    64 │ True    │ []0 │
│ ibis-datafusion32 │ True    │ []0 │
│ ibis-duckdb    32 │ True    │ []0 │
│ polars-lazy    32 │ True    │ []0 │
│ ibis-datafusion16 │ True    │ []0 │
│ ibis-duckdb    16 │ True    │ []0 │
│ polars-lazy    16 │ True    │ []0 │
│ ibis-datafusion8 │ True    │ []0 │
│ ibis-duckdb    8 │ True    │ []0 │
│ polars-lazy    8 │ True    │ []0 │
│ ibis-datafusion4 │ True    │ []0 │
│ ibis-duckdb    4 │ True    │ []0 │
│ polars-lazy    4 │ True    │ []0 │
│ ibis-datafusion2 │ True    │ []0 │
│ ibis-duckdb    2 │ True    │ []0 │
│ polars-lazy    2 │ True    │ []0 │
│ ibis-datafusion1 │ True    │ []0 │
│ ibis-duckdb    1 │ True    │ []0 │
│ polars-lazy    1 │ True    │ []0 │
└─────────────────┴───────┴─────────┴─────────────────┴─────────────────────┘
agg = get_agg(t)
agg
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ instance_type                         system           sf     n_partitions  query_number  mean_execution_seconds ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
│ stringstringint64int64int64float64                │
├──────────────────────────────────────┼─────────────────┼───────┼──────────────┼──────────────┼────────────────────────┤
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    12811215.198010 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281114.151513 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion1281114.146393 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    128123.867136 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    128121.262599 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion128121.418223 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    1281331.293637 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    128139.681746 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion128137.754292 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    1281413.875796 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    128147.143783 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion128146.379751 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    1281560.341715 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    128159.256498 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion128159.278300 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    1281610.330362 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    128167.172419 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion128165.229498 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    1281730.417159 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281719.057976 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion1281714.774110 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    12818103.227846 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281811.324261 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion1281812.952048 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281917.571991 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion12819266.100134 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    12811019.241730 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281109.889749 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion12811012.680748 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    1281114.408752 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281111.897524 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion1281112.610841 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    12811214.268959 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281129.745045 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion12811210.150931 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    12811353.542194 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281138.106897 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-datafusion1281137.618829 │
│ MacBook Pro (2021 Apple M1 Max 32GB)polars-lazy    12811414.145932 │
│ MacBook Pro (2021 Apple M1 Max 32GB)ibis-duckdb    1281147.723759 │
│  │
└──────────────────────────────────────┴─────────────────┴───────┴──────────────┴──────────────┴────────────────────────┘
totals = get_totals(t)
totals
┏━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ system           sf     total_execution_seconds ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ stringint64float64                 │
├─────────────────┼───────┼─────────────────────────┤
│ polars-lazy    128878.964834 │
│ ibis-duckdb    128241.800632 │
│ ibis-datafusion1281288.898839 │
│ polars-lazy    64286.585091 │
│ ibis-duckdb    64117.745813 │
│ ibis-datafusion64198.591653 │
│ polars-lazy    3295.891511 │
│ ibis-duckdb    3242.395885 │
│ ibis-datafusion3269.521669 │
│ polars-lazy    1630.857167 │
│ ibis-duckdb    1623.126933 │
│ ibis-datafusion1632.212283 │
│ polars-lazy    812.247739 │
│ ibis-duckdb    811.877606 │
│ ibis-datafusion814.541157 │
│ polars-lazy    45.403272 │
│ ibis-duckdb    46.427686 │
│ ibis-datafusion47.547297 │
│ polars-lazy    22.637706 │
│ ibis-duckdb    23.704135 │
│ ibis-datafusion24.143442 │
│ polars-lazy    11.442963 │
│ ibis-duckdb    12.649898 │
│ ibis-datafusion12.859929 │
└─────────────────┴───────┴─────────────────────────┘
category_orders = get_category_orders(t)
totals_line(totals)
totals_line(totals, log_y=True)
queries_bar(agg, sfs, category_orders)
Back to top