Find solution

Is ST_GeomFromText better than providing direct geometry?

Check our answers to ‘Is ST_GeomFromText better than providing direct geometry?’ - we found 22 replies and comments relevant to this matter. The best answers are submitted by users of Geographic Information Systems, Quora and Yahoo! Answers.

Best solution

  • Is ST_GeomFromText better than providing direct geometry?

    I have been working with postgis recently,and in my query if I use ST_GeomFromText it execute faster than running a sub-query to get geom. I thought ST_GeomFromText will be more expensive but after running many tests every time I got the result faster, my question Is there any explanation behind this? because for me getting the geom directly in sub-query is better than getting geom as text then added as GeomFromText. Thanks

    Answer:

    You should run an "explain analyze" on both queries. As with most performance-related questions...

    Mark as irrelevant Undo

Other solutions