|
| 1 | +# Copyright Materialize, Inc. and contributors. All rights reserved. |
| 2 | +# |
| 3 | +# Use of this software is governed by the Business Source License |
| 4 | +# included in the LICENSE file at the root of this repository. |
| 5 | +# |
| 6 | +# As of the Change Date specified in that file, in accordance with |
| 7 | +# the Business Source License, use of this software will be governed |
| 8 | +# by the Apache License, Version 2.0. |
| 9 | + |
| 10 | +name: "Internal - Proposed Optimization" |
| 11 | +description: A proposal for a new query optimization. Contributor use only. |
| 12 | +labels: ["A-optimization", "needs-discussion"] |
| 13 | +body: |
| 14 | + - type: textarea |
| 15 | + attributes: |
| 16 | + label: Elevator pitch |
| 17 | + description: Each question should be answered comprehensively but using as |
| 18 | + few sentences as possible. |
| 19 | + value: | |
| 20 | + 1. What does the transformation do? Give a representative SQL query. |
| 21 | + 2. Why should we add it? |
| 22 | + 3. When would it be good to have? |
| 23 | + 4. When would it be ineffectual? |
| 24 | + 5. When would be bad to have? |
| 25 | + 6. In the worst case, how would it degrade performance? |
| 26 | + validations: |
| 27 | + required: true |
| 28 | + - type: textarea |
| 29 | + attributes: |
| 30 | + label: List real life instances where this transformation would help. |
| 31 | + - type: textarea |
| 32 | + attributes: |
| 33 | + label: Cost Model |
| 34 | + description: | |
| 35 | + If both the implementation and cost model are simple, this section can |
| 36 | + be skipped if the implementation section is filled in. |
| 37 | +
|
| 38 | + Each subsection is meant to be answered with formulae. Take into account |
| 39 | + memory, CPU, liveness, and skew. Approximations are ok if it is not |
| 40 | + possible to calculate exact numbers. |
| 41 | +
|
| 42 | + If the transformation is always good to have, you only have to fill out |
| 43 | + the first subsection. |
| 44 | + value: | |
| 45 | + 1. What is the benefit of the transformation? |
| 46 | + 2. What is the overhead? |
| 47 | + 3. When would the transformation be worthwhile? Intuitively, this should |
| 48 | + be when benefit > overhead, but sometimes a benefit with regards to X |
| 49 | + comes at a cost with regards to Y, and it would be worthwhile to discuss |
| 50 | + when it is worthwhile to sacrifice Y to gain a benefit in X. |
| 51 | + - type: textarea |
| 52 | + attributes: |
| 53 | + label: List any knobs that we may need to tune or expose to the user. |
| 54 | + - type: textarea |
| 55 | + attributes: |
| 56 | + label: Proposed implementation |
| 57 | + value: | |
| 58 | + 1. Describe the implementation. |
| 59 | + 2. Which queries will do better with the given implementation? |
| 60 | + 3. Which queries will do worse? |
| 61 | + 4. Break the implementation down into stages. |
0 commit comments