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

Does Trino support or need data-skipping indices? #3181

Open
ryscheng opened this issue Mar 6, 2025 · 1 comment
Open

Does Trino support or need data-skipping indices? #3181

ryscheng opened this issue Mar 6, 2025 · 1 comment

Comments

@ryscheng
Copy link
Member

ryscheng commented Mar 6, 2025

What is it?

When we move to consumer Trino, our API is commonly use for simple lookups.
For example, find me all contracts from this root deployer address in contracts_v0.
Need to know how well this will perform

Here's the Hasura-generated query for this:

SELECT toJSONString(groupArray(cast("_rowset"."_rowset", 'Tuple(rows Array(Tuple("contractAddress" String, "contractNamespace" String, "deploymentDate" Date, "factoryAddress" String, "originatingAddress" String, "rootDeployerAddress" String, "sortWeight" Int64)))'))) AS "rowsets" FROM (SELECT tuple(groupArray(tuple("_row"."_field_contractAddress" AS "contractAddress", "_row"."_field_contractNamespace" AS "contractNamespace", "_row"."_field_deploymentDate" AS "deploymentDate", "_row"."_field_factoryAddress" AS "factoryAddress", "_row"."_field_originatingAddress" AS "originatingAddress", "_row"."_field_rootDeployerAddress" AS "rootDeployerAddress", "_row"."_field_sortWeight" AS "sortWeight")) AS "rows") AS "_rowset" FROM (SELECT "_origin"."contract_address" AS "_field_contractAddress", "_origin"."contract_namespace" AS "_field_contractNamespace", "_origin"."deployment_date" AS "_field_deploymentDate", "_origin"."factory_address" AS "_field_factoryAddress", "_origin"."originating_address" AS "_field_originatingAddress", "_origin"."root_deployer_address" AS "_field_rootDeployerAddress", "_origin"."sort_weight" AS "_field_sortWeight" FROM "default"."contracts_v0" AS "_origin" WHERE "_origin"."root_deployer_address" ILIKE {p0:String}) AS "_row") AS "_rowset" FORMAT TabSeparatedRaw;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant