Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how to speed up iceberg reads #55

Open
michaelzwong opened this issue May 31, 2024 · 1 comment
Open

Question: how to speed up iceberg reads #55

michaelzwong opened this issue May 31, 2024 · 1 comment

Comments

@michaelzwong
Copy link

I'm currently reading from my glue-cataloged iceberg table using the following:

duckdb.sql(
    f"""
           INSTALL httpfs;
           LOAD httpfs;
           set s3_region = 'us-west-2';
           set s3_access_key_id = '{settings.AWS_ACCESS_KEY_ID}';
           set s3_secret_access_key = '{settings.AWS_SECRET_ACCESS_KEY}';
           INSTALL iceberg;
           LOAD iceberg;
           """
)
res = duckdb.execute(
	  "SELECT * FROM iceberg_scan('s3://foopath) LIMIT 100"
)

The execution is very slow compared to just reading from the .parquet files at the same path (eg. 2 minutes vs 2 seconds).

res = duckdb.execute(
	  "SELECT * FROM parquet_scan('s3://foopath/*.parquet) LIMIT 100"
)

Would like to know what I'm doing wrong or if someone has a solution

@michaelzwong michaelzwong changed the title Question: Question: how to speed up iceberg reads May 31, 2024
@harel-e
Copy link

harel-e commented Jun 4, 2024

Hi,

I would first suggest to execute the query with 'explain analyze' and post the results here.
The cause might be issue #2, where more parquet files are scanned than necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants