Bug report #7780
Incorrect number of rows when testing layer filter expression
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | GUI | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | worksforme |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 16675 |
Description
When one tests the layer filter expression, the number of rows showed is the total number of row in the layer instead of the result of the filter.
The filter works well.
Does not happen in 1.8, it's a regression, so I set it as a blocker.
Related issues
History
#1 Updated by Matthias Kuhn over 11 years ago
- Priority changed from Severe/Regression to Normal
From qgspostgresprovider.cpp (Line 2315):
// use estimated metadata even when there is a where clause, // although we get an incorrect feature count for the subset // - but make huge dataset usable. if ( !mIsQuery && mUseEstimatedMetadata )
The currently supported solution is to disable "Use estimated metadata" for your database connection.
If you see a better way of managing this issue, please share your ideas. I have changed the priority to Normal since this is expected behavior (although admittedly odd)
#2 Updated by Alexandre Neto almost 11 years ago
I would not mind passing this issue to "Feature". And if there is no better solution, we could inform the user that he estimated metadata was used and therefore the showed values might not be accurate.
#3 Updated by Paolo Cavallini almost 11 years ago
- Subject changed from Incorrect number o rows when testing layer filter expression to Incorrect number of rows when testing layer filter expression
#4 Updated by Paolo Cavallini almost 11 years ago
- Target version changed from Version 2.0.0 to Future Release - High Priority
#5 Updated by Sandro Santilli over 10 years ago
I was also bitten by this problem, still in 2.0 and in 2.2.
Being a regression from 1.8 I don't see how it becomes a feature request.
Another thing I don't see is why mIsQuery should disable estimation while filter should not, they both basically introduce a filtering, so should be both threated the same way, IMHO (ie: disabling the estimation)
#6 Updated by Giovanni Manghi over 7 years ago
- Regression? set to No
- Easy fix? set to No
#7 Updated by Alexandre Neto over 7 years ago
As far I understand, the "Use Estimated metadata" is not used by default. I can't remember if that was the case back then... anyway, I would close this ticket, the behavior is fully documented in here:
#8 Updated by Jürgen Fischer over 7 years ago
- Resolution set to worksforme
- Description updated (diff)
- Status changed from Open to Closed