<div dir="ltr"><div><div><div>Hi Jorge<br><br></div>This feature would be good to have in the DB manager, but I do not think we should create a function in any database without warning the user.<br><br></div>Inside QGIS, we should be less intrusive and only run the SELECT SQL inside the function to get all missing indexes, show them in a QGIS table view with checkboxes, and a button to create selected indexes.</div><div>I could propose a PR for this if I find time (heavy workload this end of year...)</div><div><br></div><div>Regards</div><div>Michaël<br></div><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2017-12-01 17:09 GMT+01:00 Jorge Gustavo Rocha <span dir="ltr"><<a href="mailto:jgr@di.uminho.pt" target="_blank">jgr@di.uminho.pt</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nice contribution, Michaël! Tested and approved :-)<br>
<br>
We might use this query to offer the option "Check missing spatial<br>
indexes" in DB Manager, with an additional checkbox to "Add missing<br>
indexes". Initially just for the Postgis provider, but it can be<br>
implemented for other providers.<br>
<br>
What do you think?<br>
<br>
Regards,<br>
<br>
Jorge Gustavo<br>
<span><br></span><br></blockquote></div><br></div></div></div></div></div></div></div>