From: | postgann2020 s <postgann2020(at)gmail(dot)com> |
---|---|
To: | postgis-users(at)lists(dot)osgeo(dot)org, PostgreSQL mailing lists <pgsql-performance(at)postgresql(dot)org>, pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Suggestion to improve query performance for GIS query. |
Date: | 2020-05-22 06:59:16 |
Message-ID: | CANynezMGfmZbJ4EDFJoDRDzwJAGd0jCUtpTLFeP==ZgUOaFhyA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-performance |
Hi Team,
Thanks for your support.
Could you please suggest on below query.
EnvironmentPostgreSQL: 9.5.15
Postgis: 2.2.7
The table contains GIS data which is fiber data(underground routes).
We are using the below query inside the proc which is taking a long time to
complete.
*************************************************************
SELECT seq_no+1 INTO pair_seq_no FROM SCHEMA.TABLE WHERE (Column1 like
'%,sheath--'||cable_seq_id ||',%' or Column1 like 'sheath--'||cable_seq_id
||',%' or Column1 like '%,sheath--'||cable_seq_id or
Column1='sheath--'||cable_seq_id) order by seq_no desc limit 1 ;
****************************************************************
We have created an index on parental_path Column1 still it is taking 4secs
to get the results.
Could you please suggest a better way to execute the query.
Thanks for your support.
Regards,
PostgAnn.
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2020-05-22 07:06:05 | Re: Suggestion to improve query performance of data validation in proc. |
Previous Message | postgann2020 s | 2020-05-22 06:41:10 | Suggestion to improve query performance of data validation in proc. |
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2020-05-22 07:06:05 | Re: Suggestion to improve query performance of data validation in proc. |
Previous Message | postgann2020 s | 2020-05-22 06:41:10 | Suggestion to improve query performance of data validation in proc. |