Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[GEOT-7248] fix query for multiple columns #4135

Merged
merged 1 commit into from Jan 10, 2023

Conversation

NielsCharlier
Copy link
Contributor

@NielsCharlier NielsCharlier commented Dec 1, 2022

GEOT-7248 Powered by Pull Request Badge

test: geoserver/geoserver#6400

Checklist

For core and extension modules:

  • New unit tests have been added covering the changes.
  • Documentation has been updated (if change is visible to end users).
  • There is an issue in GeoTools Jira (except for changes not visible to end users).
  • Commit message(s) must be in the form [GEOT-XYZW] Title of the Jira ticket.
  • Bug fixes and small new features are presented as a single commit.
  • The commit targets a single objective (if multiple focuses cannot be avoided, each one is in its own commit, and has a separate ticket describing it).

Copy link
Contributor

@taba90 taba90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@taba90 taba90 merged commit 91733ce into geotools:main Jan 10, 2023
@roelarents
Copy link

Coincidentally (or not), this increases count performance by putting that distinct in a subquery. I was looking into this today (coincidentally again) because we were updating geoserver until we hit a performance issue on a large postgres table (24M) while using the schema mapping extension.

So thank you! I hope this finds its way to geoserver soon.

See e.g. this article about postgres counts by Joe Nelson that mentions postgres only using an index for distinct select, not count.

@NielsCharlier
Copy link
Contributor Author

I did not know that, but great to hear

@aaime
Copy link
Member

aaime commented Jan 11, 2023

Since it's a fix, adding backport labels, hopefully the bot will do the rest.

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