You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/12/18 20:38:30 UTC

[GitHub] [incubator-superset] betodealmeida opened a new pull request #12130: feat: estimate query cost in Postgres

betodealmeida opened a new pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   Currently the estimate query cost feature is only enabled for Presto, making it hard to test the functionality and iterate on SQL Lab without breaking it.
   
   This PR adds a simple query cost estimator to Postgres.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ![Screenshot_2020-12-18 Superset](https://user-images.githubusercontent.com/1534870/102659143-bfac3580-412d-11eb-9822-57b19f50b7a9.png)
   
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   See screenshot.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (f37bbd6) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `2.36%`.
   > The diff coverage is `54.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   63.85%   -2.37%     
   ==========================================
     Files         972      481     -491     
     Lines       48098    29711   -18387     
     Branches     4752        0    -4752     
   ==========================================
   - Hits        31852    18973   -12879     
   + Misses      16108    10738    -5370     
   + Partials      138        0     -138     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `63.85% <54.76%> (-0.35%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `86.08% <35.71%> (-1.52%)` | :arrow_down: |
   | [superset/commands/importers/v1/\_\_init\_\_.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL19faW5pdF9fLnB5) | `94.73% <50.00%> (-1.21%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `86.66% <60.00%> (-13.34%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.33% <66.66%> (+0.92%)` | :arrow_up: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.54% <100.00%> (+0.03%)` | :arrow_up: |
   | [superset/databases/schemas.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NjaGVtYXMucHk=) | `100.00% <100.00%> (ø)` | |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.58% <100.00%> (-0.31%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
   | ... and [491 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...f37bbd6](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (5fe9d66) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `3.08%`.
   > The diff coverage is `53.84%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   63.14%   -3.09%     
   ==========================================
     Files         972      972              
     Lines       48098    48110      +12     
     Branches     4752     4784      +32     
   ==========================================
   - Hits        31852    30378    -1474     
   - Misses      16108    17542    +1434     
   - Partials      138      190      +52     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `61.96% <ø> (ø)` | |
   | python | `63.87% <53.84%> (-0.34%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `84.27% <35.71%> (-3.33%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `86.66% <60.00%> (-13.34%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `82.68% <66.66%> (+0.28%)` | :arrow_up: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.54% <100.00%> (+0.03%)` | :arrow_up: |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.86% <100.00%> (-3.02%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [150 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...f37bbd6](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (7fa541e) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `2.95%`.
   > The diff coverage is `47.50%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   63.27%   -2.96%     
   ==========================================
     Files         972      481     -491     
     Lines       48098    29693   -18405     
     Branches     4752        0    -4752     
   ==========================================
   - Hits        31852    18787   -13065     
   + Misses      16108    10906    -5202     
   + Partials      138        0     -138     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `63.27% <47.50%> (-0.94%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `85.56% <35.71%> (-2.04%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `82.45% <47.05%> (-17.55%)` | :arrow_down: |
   | [superset/commands/importers/v1/\_\_init\_\_.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL19faW5pdF9fLnB5) | `94.73% <50.00%> (-1.21%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `70.56% <50.00%> (-11.85%)` | :arrow_down: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.54% <100.00%> (+0.03%)` | :arrow_up: |
   | [superset/databases/schemas.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NjaGVtYXMucHk=) | `95.60% <100.00%> (-4.40%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `86.14% <100.00%> (-2.75%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `32.65% <0.00%> (-59.19%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | ... and [520 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...7fa541e](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] ktmud commented on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
ktmud commented on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748336486


   What's the unit of this cost? Seconds?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] betodealmeida edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
betodealmeida edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748339608


   > What's the unit of this cost? Seconds?
   
   > The costs are measured in arbitrary units determined by the planner's cost parameters (see Section 18.7.2). Traditional practice is to measure the costs in units of disk page fetches; that is, seq_page_cost is conventionally set to 1.0 and the other cost parameters are set relative to that. The examples in this section are run with the default cost parameters. [[reference](https://www.postgresql.org/docs/9.4/using-explain.html)]
   
   It's a relative value, so not super useful. But it's possible to collect stats about queries, and define a custom `QUERY_COST_FORMATTERS_BY_ENGINE` that maps from the relative values to something else. For example, you could run `EXPLAIN` offline every day in all recent queries, and use the results to built a histogram, so that the formatter says something like "this query is at the top 3% percentile of all queries".
   
   We had this running at Lyft for Presto, and we would show wall time, dollar cost and carbon footprint this way.
   
   See https://github.com/apache/incubator-superset/pull/8470.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] ktmud commented on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
ktmud commented on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748347830


   Thanks for the explanation! In that case, do you think it's worth adding the link to Postgres doc somewhere in the modal. Or at least a one-liner to explain how is this calculated? E.g.
   
   ```
   Query cost is estimated by `EXPLAIN` statement. Refer to the database docs for details.
   ``` 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] betodealmeida edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
betodealmeida edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748339608


   > What's the unit of this cost? Seconds?
   
   > The costs are measured in arbitrary units determined by the planner's cost parameters (see Section 18.7.2). Traditional practice is to measure the costs in units of disk page fetches; that is, seq_page_cost is conventionally set to 1.0 and the other cost parameters are set relative to that. The examples in this section are run with the default cost parameters. [[reference](https://www.postgresql.org/docs/9.4/using-explain.html)]
   
   It's a relative value, so not super useful. But it's possible to collect stats about queries, and define a custom `QUERY_COST_FORMATTERS_BY_ENGINE` that maps from the relative values to something else. For example, you could run `EXPLAIN` offline every day in all recent queries, and use the results to built a histogram, so that the formatter says something like "this query is at the top 3% percentile of all queries".
   
   We had this running at Lyft, and we would show wall time, dollar cost and carbon footprint this way.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (f37bbd6) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `2.02%`.
   > The diff coverage is `54.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   64.20%   -2.03%     
   ==========================================
     Files         972      481     -491     
     Lines       48098    29711   -18387     
     Branches     4752        0    -4752     
   ==========================================
   - Hits        31852    19075   -12777     
   + Misses      16108    10636    -5472     
   + Partials      138        0     -138     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `64.20% <54.76%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `86.08% <35.71%> (-1.52%)` | :arrow_down: |
   | [superset/commands/importers/v1/\_\_init\_\_.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL19faW5pdF9fLnB5) | `94.73% <50.00%> (-1.21%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `86.66% <60.00%> (-13.34%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.33% <66.66%> (+0.92%)` | :arrow_up: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.54% <100.00%> (+0.03%)` | :arrow_up: |
   | [superset/databases/schemas.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NjaGVtYXMucHk=) | `100.00% <100.00%> (ø)` | |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.85% <100.00%> (-0.04%)` | :arrow_down: |
   | [...ntend/src/components/FacePile/FacePile.stories.tsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRmFjZVBpbGUvRmFjZVBpbGUuc3Rvcmllcy50c3g=) | | |
   | [superset-frontend/src/setup/setupClient.ts](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ2xpZW50LnRz) | | |
   | [...rontend/src/dashboard/reducers/dashboardFilters.js](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9yZWR1Y2Vycy9kYXNoYm9hcmRGaWx0ZXJzLmpz) | | |
   | ... and [488 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...f37bbd6](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (f37bbd6) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `2.62%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   63.60%   -2.63%     
   ==========================================
     Files         972      481     -491     
     Lines       48098    29696   -18402     
     Branches     4752        0    -4752     
   ==========================================
   - Hits        31852    18887   -12965     
   + Misses      16108    10809    -5299     
   + Partials      138        0     -138     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `63.60% <50.00%> (-0.61%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `70.56% <33.33%> (-11.85%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `86.08% <35.71%> (-1.52%)` | :arrow_down: |
   | [superset/commands/importers/v1/\_\_init\_\_.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL19faW5pdF9fLnB5) | `94.73% <50.00%> (-1.21%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `83.33% <55.00%> (-16.67%)` | :arrow_down: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.54% <100.00%> (+0.03%)` | :arrow_up: |
   | [superset/databases/schemas.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NjaGVtYXMucHk=) | `100.00% <100.00%> (ø)` | |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.04% <100.00%> (-0.85%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
   | ... and [506 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...f37bbd6](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (7fa541e) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `2.59%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   63.62%   -2.60%     
   ==========================================
     Files         972      481     -491     
     Lines       48098    29708   -18390     
     Branches     4752        0    -4752     
   ==========================================
   - Hits        31852    18903   -12949     
   + Misses      16108    10805    -5303     
   + Partials      138        0     -138     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `63.62% <50.00%> (-0.58%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `86.08% <35.71%> (-1.52%)` | :arrow_down: |
   | [superset/commands/importers/v1/\_\_init\_\_.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL19faW5pdF9fLnB5) | `94.73% <50.00%> (-1.21%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `70.56% <50.00%> (-11.85%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `85.96% <52.94%> (-14.04%)` | :arrow_down: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.54% <100.00%> (+0.03%)` | :arrow_up: |
   | [superset/databases/schemas.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NjaGVtYXMucHk=) | `100.00% <100.00%> (ø)` | |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.04% <100.00%> (-0.85%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
   | ... and [497 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...7fa541e](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] betodealmeida commented on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
betodealmeida commented on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748339608


   > What's the unit of this cost? Seconds?
   
   The costs are measured in arbitrary units determined by the planner's cost parameters (see Section 18.7.2). Traditional practice is to measure the costs in units of disk page fetches; that is, seq_page_cost is conventionally set to 1.0 and the other cost parameters are set relative to that. The examples in this section are run with the default cost parameters. [[reference](https://www.postgresql.org/docs/9.4/using-explain.html)]
   
   It's a relative value, so not super useful. But it's possible to collect stats about queries, and define a custom `QUERY_COST_FORMATTERS_BY_ENGINE` that maps from the relative values to something else. For example, you could run `EXPLAIN` every day in all recent queries, and use the results to built a histogram, so that the formatter says something like "this query is at the top 3% percentile of all queries".


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] betodealmeida commented on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
betodealmeida commented on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748367534


   @ktmud unfortunately the modal is not DB-specific, so we can't add that message to it.
   
   I also don't expect people to use it without an admin setting up a custom formatter that translates the number into a meaningful value. I added an example to `config.py` showing to set it up so that the numbers are more tangible.
   
   Here's a screenshot with that config in place:
   
   <img width="720" alt="Screen Shot 2020-12-18 at 3 13 56 PM" src="https://user-images.githubusercontent.com/1534870/102669521-a9a96f80-4143-11eb-9e46-60ba2ef7922e.png">
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] betodealmeida merged pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
betodealmeida merged pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (f37bbd6) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `2.02%`.
   > The diff coverage is `54.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   64.20%   -2.03%     
   ==========================================
     Files         972      481     -491     
     Lines       48098    29711   -18387     
     Branches     4752        0    -4752     
   ==========================================
   - Hits        31852    19075   -12777     
   + Misses      16108    10636    -5472     
   + Partials      138        0     -138     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `64.20% <54.76%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `86.08% <35.71%> (-1.52%)` | :arrow_down: |
   | [superset/commands/importers/v1/\_\_init\_\_.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL19faW5pdF9fLnB5) | `94.73% <50.00%> (-1.21%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `86.66% <60.00%> (-13.34%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.33% <66.66%> (+0.92%)` | :arrow_up: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.54% <100.00%> (+0.03%)` | :arrow_up: |
   | [superset/databases/schemas.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NjaGVtYXMucHk=) | `100.00% <100.00%> (ø)` | |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.85% <100.00%> (-0.04%)` | :arrow_down: |
   | [...perset-frontend/src/components/CopyToClipboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ29weVRvQ2xpcGJvYXJkLmpzeA==) | | |
   | [...ontend/src/views/CRUD/data/dataset/DatasetList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhc2V0L0RhdGFzZXRMaXN0LnRzeA==) | | |
   | [...explore/components/controls/SelectAsyncControl.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9TZWxlY3RBc3luY0NvbnRyb2wuanN4) | | |
   | ... and [488 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...f37bbd6](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] hughhhh commented on a change in pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
hughhhh commented on a change in pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#discussion_r546080371



##########
File path: superset/db_engine_specs/presto.py
##########
@@ -132,7 +132,8 @@ class PrestoEngineSpec(BaseEngineSpec):  # pylint: disable=too-many-public-metho
     }
 
     @classmethod
-    def get_allow_cost_estimate(cls, version: Optional[str] = None) -> bool:
+    def get_allow_cost_estimate(cls, extra: Dict[str, Any]) -> bool:
+        version = extra.get("version")
         return version is not None and StrictVersion(version) >= StrictVersion("0.319")

Review comment:
       one liner:
   `return extra.get("version") and StrictVersion(version) >= StrictVersion("0.319")`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io commented on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (5fe9d66) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `4.26%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   61.96%   -4.27%     
   ==========================================
     Files         972      491     -481     
     Lines       48098    18402   -29696     
     Branches     4752     4784      +32     
   ==========================================
   - Hits        31852    11402   -20450     
   + Misses      16108     6810    -9298     
   - Partials      138      190      +52     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `61.96% <ø> (ø)` | |
   | python | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...-frontend/src/visualizations/presets/MainPreset.js](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL3ByZXNldHMvTWFpblByZXNldC5qcw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...tend/src/dashboard/containers/DashboardBuilder.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZEJ1aWxkZXIuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...c/visualizations/FilterBox/FilterBoxChartPlugin.js](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL0ZpbHRlckJveC9GaWx0ZXJCb3hDaGFydFBsdWdpbi5qcw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...oard/components/gridComponents/new/NewMarkdown.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL25ldy9OZXdNYXJrZG93bi5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [604 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...f37bbd6](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (5fe9d66) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `3.35%`.
   > The diff coverage is `53.84%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   62.87%   -3.36%     
   ==========================================
     Files         972      972              
     Lines       48098    48110      +12     
     Branches     4752     4784      +32     
   ==========================================
   - Hits        31852    30248    -1604     
   - Misses      16108    17672    +1564     
   - Partials      138      190      +52     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `61.96% <ø> (ø)` | |
   | python | `63.43% <53.84%> (-0.77%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `79.38% <35.71%> (-8.22%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `86.66% <60.00%> (-13.34%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `74.67% <66.66%> (-7.73%)` | :arrow_down: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.54% <100.00%> (+0.03%)` | :arrow_up: |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.59% <100.00%> (-3.30%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [155 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...f37bbd6](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (5fe9d66) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `3.07%`.
   > The diff coverage is `53.84%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   63.14%   -3.08%     
   ==========================================
     Files         972      972              
     Lines       48098    48110      +12     
     Branches     4752     4784      +32     
   ==========================================
   - Hits        31852    30381    -1471     
   - Misses      16108    17539    +1431     
   - Partials      138      190      +52     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `61.96% <ø> (ø)` | |
   | python | `63.88% <53.84%> (-0.33%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `84.27% <35.71%> (-3.33%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `86.66% <60.00%> (-13.34%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.33% <66.66%> (+0.92%)` | :arrow_up: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.54% <100.00%> (+0.03%)` | :arrow_up: |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.86% <100.00%> (-3.02%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [149 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...f37bbd6](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (7fa541e) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `2.63%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   63.58%   -2.64%     
   ==========================================
     Files         972      481     -491     
     Lines       48098    29693   -18405     
     Branches     4752        0    -4752     
   ==========================================
   - Hits        31852    18880   -12972     
   + Misses      16108    10813    -5295     
   + Partials      138        0     -138     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `63.58% <50.00%> (-0.63%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `86.08% <35.71%> (-1.52%)` | :arrow_down: |
   | [superset/commands/importers/v1/\_\_init\_\_.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL19faW5pdF9fLnB5) | `94.73% <50.00%> (-1.21%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `70.56% <50.00%> (-11.85%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `85.96% <52.94%> (-14.04%)` | :arrow_down: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.54% <100.00%> (+0.03%)` | :arrow_up: |
   | [superset/databases/schemas.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NjaGVtYXMucHk=) | `100.00% <100.00%> (ø)` | |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `87.22% <100.00%> (-1.67%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
   | ... and [506 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...7fa541e](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] betodealmeida edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
betodealmeida edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748339608


   > What's the unit of this cost? Seconds?
   
   > The costs are measured in arbitrary units determined by the planner's cost parameters (see Section 18.7.2). Traditional practice is to measure the costs in units of disk page fetches; that is, seq_page_cost is conventionally set to 1.0 and the other cost parameters are set relative to that. The examples in this section are run with the default cost parameters. [[reference](https://www.postgresql.org/docs/9.4/using-explain.html)]
   
   It's a relative value, so not super useful. But it's possible to collect stats about queries, and define a custom `QUERY_COST_FORMATTERS_BY_ENGINE` that maps from the relative values to something else. For example, you could run `EXPLAIN` offline every day in all recent queries, and use the results to built a histogram, so that the formatter says something like "this query is at the top 3% percentile of all queries".
   
   We had this running at Lyft for Presto, and we would show wall time, dollar cost and carbon footprint this way.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (f37bbd6) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `2.87%`.
   > The diff coverage is `54.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   63.34%   -2.88%     
   ==========================================
     Files         972      972              
     Lines       48098    48113      +15     
     Branches     4752     4784      +32     
   ==========================================
   - Hits        31852    30477    -1375     
   - Misses      16108    17446    +1338     
   - Partials      138      190      +52     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `61.96% <ø> (ø)` | |
   | python | `64.20% <54.76%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `86.08% <35.71%> (-1.52%)` | :arrow_down: |
   | [superset/commands/importers/v1/\_\_init\_\_.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL19faW5pdF9fLnB5) | `94.73% <50.00%> (-1.21%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `86.66% <60.00%> (-13.34%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `83.33% <66.66%> (+0.92%)` | :arrow_up: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.54% <100.00%> (+0.03%)` | :arrow_up: |
   | [superset/databases/schemas.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NjaGVtYXMucHk=) | `100.00% <100.00%> (ø)` | |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.85% <100.00%> (-0.04%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [135 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...f37bbd6](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] betodealmeida edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
betodealmeida edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748367534


   @ktmud unfortunately the modal is not DB-specific, so we can't add that message to it.
   
   I also don't expect people to use it without an admin setting up a custom formatter that translates the number into a meaningful value. I added an example to `config.py` showing to set it up so that the numbers are more tangible.
   
   Here's a screenshot with that config in place:
   
   <img width="727" alt="Screen Shot 2020-12-18 at 3 15 37 PM" src="https://user-images.githubusercontent.com/1534870/102669607-e7a69380-4143-11eb-9800-38192b41d4b0.png">
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] betodealmeida edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
betodealmeida edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748339608


   > What's the unit of this cost? Seconds?
   
   > The costs are measured in arbitrary units determined by the planner's cost parameters (see Section 18.7.2). Traditional practice is to measure the costs in units of disk page fetches; that is, seq_page_cost is conventionally set to 1.0 and the other cost parameters are set relative to that. The examples in this section are run with the default cost parameters. [[reference](https://www.postgresql.org/docs/9.4/using-explain.html)]
   
   It's a relative value, so not super useful. But it's possible to collect stats about queries, and define a custom `QUERY_COST_FORMATTERS_BY_ENGINE` that maps from the relative values to something else. For example, you could run `EXPLAIN` offline every day in all recent queries, and use the results to built a histogram, so that the formatter says something like "this query is at the top 3% percentile of all queries".


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748320193


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=h1) Report
   > Merging [#12130](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=desc) (f37bbd6) into [master](https://codecov.io/gh/apache/incubator-superset/commit/2a23744223f21751c5af1bc8158c821746950da0?el=desc) (2a23744) will **decrease** coverage by `2.67%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/12130/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #12130      +/-   ##
   ==========================================
   - Coverage   66.22%   63.55%   -2.68%     
   ==========================================
     Files         972      481     -491     
     Lines       48098    29696   -18402     
     Branches     4752        0    -4752     
   ==========================================
   - Hits        31852    18872   -12980     
   + Misses      16108    10824    -5284     
   + Partials      138        0     -138     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `63.55% <50.00%> (-0.66%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `70.56% <33.33%> (-11.85%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `85.56% <35.71%> (-2.04%)` | :arrow_down: |
   | [superset/commands/importers/v1/\_\_init\_\_.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL19faW5pdF9fLnB5) | `94.73% <50.00%> (-1.21%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `83.33% <55.00%> (-16.67%)` | :arrow_down: |
   | [superset/config.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `90.54% <100.00%> (+0.03%)` | :arrow_up: |
   | [superset/databases/schemas.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NjaGVtYXMucHk=) | `100.00% <100.00%> (ø)` | |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.04% <100.00%> (-0.85%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `54.61% <0.00%> (-29.62%)` | :arrow_down: |
   | ... and [510 more](https://codecov.io/gh/apache/incubator-superset/pull/12130/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=footer). Last update [2a23744...f37bbd6](https://codecov.io/gh/apache/incubator-superset/pull/12130?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] ktmud commented on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
ktmud commented on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748393867


   @betodealmeida Thanks for the explanation. This makes sense.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] betodealmeida edited a comment on pull request #12130: feat: estimate query cost in Postgres

Posted by GitBox <gi...@apache.org>.
betodealmeida edited a comment on pull request #12130:
URL: https://github.com/apache/incubator-superset/pull/12130#issuecomment-748339608


   > What's the unit of this cost? Seconds?
   
   > The costs are measured in arbitrary units determined by the planner's cost parameters (see Section 18.7.2). Traditional practice is to measure the costs in units of disk page fetches; that is, seq_page_cost is conventionally set to 1.0 and the other cost parameters are set relative to that. The examples in this section are run with the default cost parameters. [[reference](https://www.postgresql.org/docs/9.4/using-explain.html)]
   
   It's a relative value, so not super useful. But it's possible to collect stats about queries, and define a custom `QUERY_COST_FORMATTERS_BY_ENGINE` that maps from the relative values to something else. For example, you could run `EXPLAIN` every day in all recent queries, and use the results to built a histogram, so that the formatter says something like "this query is at the top 3% percentile of all queries".


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org