<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Mar 4, 2017 at 9:25 AM, Nathan Woodrow <span dir="ltr"><<a href="mailto:madmanwoo@gmail.com" target="_blank">madmanwoo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hmm are you sure we don't do this already?  <div><br></div><div>I suspect we do. Each provider can handle the sorting, giving to it by QgsFeatureRequest, and hand the results back to the caller.  I thought the attribute table was already implemented this way.<div><br></div><div>Regards,<br>Nathan</div></div></div></blockquote><div><br></div><div>Hi,<br><br></div><div>IIRC the last time I looked into it (way more than 1 year ago) the sorting/filtering on PostGIS was not yet implemented on the back-end, that's why the provider (invoked from the attribute table) was fetching all the records.<br><br></div><div>Please correct me if I'm wrong, but I think that the sorting/filtering is now implemented in the backend (at least for PostGIS, not sure about the status of every provider) but the attribute table will still fetch all records unless you limit the view to the map/project extent.<br><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="gmail-h5">On Sat, Mar 4, 2017 at 6:03 PM, Tobias Wendorff <span dir="ltr"><<a href="mailto:tobias.wendorff@tu-dortmund.de" target="_blank">tobias.wendorff@tu-dortmund.<wbr>de</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5"><span>Am Sa, 4.03.2017, 08:34 schrieb Alessandro Pasotti:<br>
><br>
> Yes, that would be a strategy, but you might run into problem with<br>
> sorting and filtering if the data provider does not support for it.<br>
<br>
</span>All database-like formats, even Shapefile's DBF, support sorting<br>
on database level. I've never understood, why some applications<br>
download the whole content first and<br>
<br>
Microsoft Access is such a "problem". Some days ago, it has downloaded<br>
700 MB of data from the database to figure out "first" and "min/max".<br>
Access has a "pass-through" function for this to make it directly<br>
work on database level, but it's somehow hard to handle.<br>
<br>
But you're right. For things like sorting in calculation, there<br>
has to be a different solution, like threaded or staged or using<br>
"processing" toolbar only.<br>
<br>
My system can't even handle to download 3 * 10^6 attributes :(<br>
</div></div><div class="gmail-m_6873599497217524523HOEnZb"><div class="gmail-m_6873599497217524523h5"><br><span class="gmail-">
______________________________<wbr>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/qgis-user</a></span></div></div></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div>
</div></div>