<div dir="ltr"><div>Hi Raymond,</div><div><br></div><div>You are right. </div><div><br></div><div>Provider filters are generally much more efficient because, at least when dealing with real DB backends, they can significantly reduce the data transfer (filtering happens on the backend).</div><div><br></div><div>That said, many QGIS data providers can transform some (not all, but the most common) QGIS expressions into backend side filters, effectively reducing or nullifying the performance gap between the two types of filters.</div><div><br></div><div>On the other hand, QGIS expressions have much more powerful capabilities and you can create complex expressions that are not possible with backend side filters.</div><div><br></div><div>Another advantage of QGIS expressions filters is that they are completely independent from the data provider and can be safely used with any QGIS supported data provider while backend filters are written in a specific SQL dialect that may be non completely compatible between providers.</div><div><br></div><div>Hope this helps!</div><div><br></div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Sep 24, 2025 at 4:07 PM Raymond Nijssen via QGIS-Developer <<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi David,<br>
<br>
That sounds very useful to me! I often find myself struggling writing <br>
the right expression, or even adding a column to my data to be able to <br>
set the desired provider filter.<br>
<br>
But I think the provider filter is more efficient as it really prevents <br>
the data from the file ending up in QGIS. Or am I wrong? Is there a <br>
penalty for filtering data in QGIS?<br>
<br>
BTW, even with a performance penalty this functionality could be super <br>
handy for small datasets!<br>
<br>
Kind regards,<br>
Raymond<br>
<br>
<br>
On 9/24/25 14:56, David Signer via QGIS-Developer wrote:<br>
> Hi there<br>
> <br>
> I've been considering enhancing the Query Builder (accessible via Layer <br>
> -> Filter...) by QGIS expression based filters. At least with project <br>
> and global scope.<br>
> Maybe with tabs to distinguish between "provider side filter" (current <br>
> functionality) and "expression filter" (new functionality).<br>
> <br>
> Any opinions on this? In my view, this could be valuable because it's <br>
> available on all kinds of data-layers and allows us to use variables and <br>
> functions for filtering as well.<br>
> <br>
> Thanks for any feedback and cheers<br>
> Dave<br>
> <br>
> --<br>
> <br>
> Dave Signer<br>
> Senior Developer & INTERLIS Architect<br>
> OPENGIS.ch - Team QGIS & Industry Solutions<br>
> <br>
> <br>
> _______________________________________________<br>
> QGIS-Developer mailing list<br>
> <a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><div><br clear="all"></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Alessandro Pasotti</div><div>QCooperative: <a href="https://www.qcooperative.net" target="_blank">www.qcooperative.net</a><br></div>ItOpen: <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div></div>