Robert Fitzpatrick wrote:
I have developed a view in pgsql that takes over 160K ms to execute, but
when copied into MS SQL against the old database (with syntax mods of
course), runs in a few seconds.

Your query seems to produce 41.8 million rows. Are you sure MS-SQL is returning that many rows in a few seconds?

Merge Left Join  (cost=35366.42..57565.28 rows=565261 width=297) (actual 
time=1000.457..148111.905 rows=41866801 loops=1)

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to