<div dir="ltr">Hello,<div><br></div><div>What are the indexes on the table?</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 6, 2018 at 7:16 PM Manchon Pierre <<a href="mailto:pierre.manchon@irstea.fr">pierre.manchon@irstea.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="FR" link="blue" vlink="purple"><div class="m_-2617228116946897319WordSection1"><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Yes the request took about ~100ms to be executed before but now it never ends (I left it 1h)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">(thx for the tip with where clause)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">De :</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> postgis-users <<a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@lists.osgeo.org</a>> <b>De la part de</b> Tumasgiu Rossini<br><b>Envoyé :</b> jeudi 6 décembre 2018 17:09<br><b>À :</b> PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a>><br><b>Objet :</b> Re: [postgis-users] Very long query time<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">I do not really understand.<u></u><u></u></p></div><div><p class="MsoNormal">Is it a query which used to be faster ?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">A little remark on your where clause :<u></u><u></u></p></div><div><p class="MsoNormal">it is unnecesseraly complicated and could be shortened to :<u></u><u></u></p></div><div><p class="MsoNormal"> WHERE st_intersects(zi.geom, tile.geom)<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">True and false value doesn't need to be surronded by quote,<u></u><u></u></p></div><div><p class="MsoNormal">here you are implicitly casting the string value 'true' to its boolean representation<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">Le jeu. 6 déc. 2018 à 16:53, Manchon Pierre <<a href="mailto:pierre.manchon@irstea.fr" target="_blank">pierre.manchon@irstea.fr</a>> a écrit :<u></u><u></u></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm"><div><div><p class="MsoNormal"><span lang="EN-US">Hello there,</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">I'm new on the list and for a premiere I would like to know if some of you have a very long runtime for some of their queries (even with a LIMIT 5), whereas those queries were working well before (nothing changed from that). I'm using Postgre10, pgAdmin4 and postgis 2.4.4 on windows …</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">The infinite query I’m trying to execute: (only ~500 rows are stored on each of the two tables)</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><table class="m_-2617228116946897319MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tr><td width="626" valign="top" style="width:469.8pt;border:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt"><p class="MsoNormal"><span lang="EN-US">SELECT code_tile, code_zi FROM data.tile, data.zi</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">WHERE ST_Intersects(zi.geom, tile.geom) = 'true'</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">GROUP BY code_zi, code_tile, zi.geom, tile.geom</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">LIMIT 5</span><u></u><u></u></p></td></tr></table><p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">Thank you for your time</span><u></u><u></u></p></div></div><p class="MsoNormal">_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><u></u><u></u></p></blockquote></div></div></div>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>Darafei Praliaskouski</div><div>Support me: <a href="http://patreon.com/komzpa" target="_blank">http://patreon.com/komzpa</a></div></div></div></div>