Timeline for Postgresql subquery speed much slower than individual queries
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 7, 2020 at 22:25 | history | edited | CommunityBot |
added [postgresql-performance] to 571 questions - Shog9 (Id=1924)
|
|
Mar 25, 2014 at 7:59 | history | tweeted | twitter.com/#!/StackDBAs/status/448368528933265408 | ||
Mar 25, 2014 at 1:10 | answer | added | Erwin Brandstetter | timeline score: 4 | |
Mar 24, 2014 at 23:52 | history | edited | Erwin Brandstetter | CC BY-SA 3.0 |
improve format, minor edits, add tags
|
Mar 24, 2014 at 23:17 | comment | added | Erwin Brandstetter |
The question should have table definitions - what you get with \d tbl from psql.
|
|
Mar 24, 2014 at 22:42 | history | migrated | from stackoverflow.com (revisions) | ||
Mar 24, 2014 at 21:41 | comment | added | Sehael | @RichardHuxton thanks to your questions, I was able to figure out that the problem was the data types of the two columns. They both need to be the same data type, so once I changed the geometry column to geography, the query runs as expected. If you post that as an answer, I will accept it. | |
Mar 24, 2014 at 21:22 | comment | added | Sehael |
@Richard Huxton, I also realized the postal_code is geography and the timezone is using geometry . That may be the issue, but I'm no expert with PostGIS.
|
|
Mar 24, 2014 at 21:21 | comment | added | Sehael | "POINT(-112.823003 49.697541)" is the coord, using EPSG 4326 | |
Mar 24, 2014 at 21:19 | comment | added | Richard Huxton | What is the coord for that postal_code? What type and coordinate system? Because it doesn't think it can use the index. So compare the two. | |
Mar 24, 2014 at 21:10 | comment | added | swasheck | please post the query plan (EXPLAIN ANALYZE) | |
Mar 24, 2014 at 20:59 | history | asked | Sehael | CC BY-SA 3.0 |