[
https://issues.apache.org/jira/browse/CASSANDRA-18248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17687158#comment-17687158
]
Josh McKenzie commented on CASSANDRA-18248:
-------------------------------------------
{quote}will probably result in a broader set of unrelated queries being
prepared rather than when a single app revolves around a set of a more or less
fixed corpus of queries.
{quote}
My mental model of this is that you'd still have effectively O(1) complexity
growth as you would hope that just because you have N clients querying a
multi-tenant database, all of them would follow data modeling best practices,
prepare once, execute many times, etc. So having 1 client w/a clean set of 10
prepared queries, vs. 5 with a set of 50, vs. 100 with 1000, you'd still have
the same relationship of "time spent preparing" vs. "time spent executing" in
terms of each client's subjective performance contours.
Now, the subtle undertone I'm picking up here is a different question which is
"Should we consider removing streams from query preparing to help guard against
folks that are hammering the Query building path by not appropriately using
prepared queries". That's an interesting and pointed question, but my suspicion
remains that the overhead of the streams API portion of this execution would
still be minimal vs. all the other things going on. Happy to be proven wrong /
educated on that front if you're feeling particularly curious. :)
> Consider avoiding streams on query building
> -------------------------------------------
>
> Key: CASSANDRA-18248
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18248
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Berenguer Blasi
> Priority: Normal
> Labels: low-hanging-fruit
>
> During the review of CASSANDRA-18068 it was discussed whether preparing
> queries might be considered a hot path or not. Seen in isolation it isn't.
> But given multi-tenancy setups i.e. and coming from the experience of seeing
> how prepare is used by some customers as per some bug reports this might not
> be 100% true
> Let's discuss here if removing streams would make any sense. Most rewrites I
> expect wouldn't impact readability. [~adelapena] took a first stab and
> compiled a first list of candidates:
> *
> [o.a.c.cql3/CQL3Type.java#L840|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/CQL3Type.java#L840]
> *
> [o.a.c.cql3/CQL3Type.java#L876|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/CQL3Type.java#L876]
> *
> [o.a.c.cql3/Lists.java#L133|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/Lists.java#L133]
> *
> [o.a.c.cql3/Sets.java#L123|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/Sets.java#L123]
> *
> [o.a.c.cql3/MultiColumnRelation.java#L225|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/MultiColumnRelation.java#L225]
> *
> [o.a.c.cql3/QueryProcessor.java#L481|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/QueryProcessor.java#L481]
> *
> [o.a.c.cql3/TokenRelation.java#L138|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/TokenRelation.java#L138]
> *
> [o.a.c.cql3/conditions/ColumnConditions.java#L75|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/conditions/ColumnConditions.java#L75]
> *
> [o.a.c.cql3/functions/AbstractFunction.java#L69|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/functions/AbstractFunction.java#L69]
> *
> [o.a.c.cql3/functions/FunctionResolver.java#L203|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/functions/FunctionResolver.java#L203]
> *
> [o.a.c.cql3/functions/UDAggregate.java#L97|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/functions/UDAggregate.java#L97]
> *
> [o.a.c.cql3/restrictions/StatementRestrictions.java#L380|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/restrictions/StatementRestrictions.java#L380]
> *
> [o.a.c.cql3/selection/AbstractFunctionSelector.java#L72|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/selection/AbstractFunctionSelector.java#L72]
> *
> [o.a.c.cql3/selection/MapSelector.java#L113|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/selection/MapSelector.java#L113]
> *
> [o.a.c.cql3/selection/Selectable.java#L708|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/selection/Selectable.java#L708]
> *
> [o.a.c.cql3/selection/Selectable.java#L793|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/selection/Selectable.java#L793]
> *
> [o.a.c.cql3/selection/Selectable.java#L886|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/selection/Selectable.java#L886]
> *
> [o.a.c.cql3/selection/Selectable.java#L954|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/selection/Selectable.java#L954]
> *
> [o.a.c.cql3/selection/Selectable.java#L1024|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/selection/Selectable.java#L1024]
> *
> [o.a.c.cql3/statements/SelectStatement.java#L1278|https://github.com/apache/cassandra/blob/cassandra-4.1.0/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java#L1278]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]