I have a PostGIS DB populated with OSM data (osm2pgsql). I defined styles for several features. Some are styled, others are not. But every time I update the canvas or load my project, all of the features from the DB are loaded - also the features I don't styled (because they are not important for my task). I'm wondering, If I could save CPU and RAM by pre-filter the features I don't need. I already do that in my line-layer for rivers. The feature filter is simply:
"waterway" IN ('river', 'stream', 'canal')
Just the waterways are loaded and all others, like railways or streets, are filtered out. It's easy in that waterway-case, because the work is done with that small query. But for my polygons and points I have got a way much more complex filter:
Now I would like to use my styling-rules to pre-filter the DB-Import. I know, I could copy and paste... but I need a more comfortable and flexible way (if I change something in the styling and add or delete a feature-class, I have to do the same in the feature filter).