[postgis-users] drawQuery() takes forever...

Pena Kupen kupen at wippies.fi
Tue Jul 24 07:36:47 PDT 2012


Hello,

I have a postgres query, which takes about 0,1sek and resultset is one line On my page, there is a link, which uses same sql tuo print koordinates to map.
When plotting to the maps, it's never ends.

I killed query from active task and pick sql from postgres log. It seems like following:

 select encode(AsBinary(force_collection(force_2d("koord")),'NDR'),'hex') as geom,"oid" from 
(
   select  ... [subpressed query]
) as foobar 
where koord && GeomFromText('POLYGON((3517739 7581169,3517739 7587169,3523739 7587169,3523739 7581169,3517739 7581169))',find_srid('','location','koord'))

When trying same with phpPgAdmin, first just my sql from same sql-sentence.
select  ... [subpressed query]
It takes same 0,1sek and one line as result.

When trying same query as whole
 select encode(AsBinary(force_collection(force_2d("koord")),'NDR'),'hex') as geom,"oid" from 
(
   select  ... [subpressed query]
) as foobar 
where koord && GeomFromText('POLYGON((3517739 7581169,3517739 7587169,3523739 7587169,3523739 7581169,3517739 7581169))',find_srid('','location','koord'))
It takes long time. After 15minutes, I killed query again.

Any idea, why this hungs? 
Am I doing something wrongly?
How to trace this?

--
Pena

-- 
Wippies-vallankumous on täällä! Varmista paikkasi vallankumouksen eturintamassa ja liity Wippiesiin heti!
http://www.wippies.com/





More information about the postgis-users mailing list