QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=231579.22..231579.22 rows=1 width=728) (actual time=31694.695..31694.881 rows=10 loops=1) -> Hash Left Join (cost=175223.17..231579.22 rows=2 width=728) (actual time=31694.513..31694.847 rows=20 loops=1) Hash Cond: (residenced19_.residencetype_id = residencet22_.id) -> Hash Join (cost=175221.97..231577.99 rows=2 width=703) (actual time=31673.089..31673.327 rows=20 loops=1) Hash Cond: (city1_.associatedgisfeature_id = gf2_.id) -> Hash Join (cost=172805.64..228974.15 rows=50000 width=546) (actual time=31580.727..31580.879 rows=20 loops=1) Hash Cond: (residenced19_.city_id = city1_.id) -> Hash Join (cost=94091.95..130023.46 rows=50000 width=530) (actual time=19588.949..22856.266 rows=50000 loops=1) Hash Cond: (this_.residencedescription_id = residenced19_.id) -> Hash Left Join (cost=87371.30..116064.81 rows=50000 width=308) (actual time=17404.025..17644.729 rows=50000 loops=1) Hash Cond: (contactinf7_.city_id = city8_.id) -> Hash Left Join (cost=8657.62..20542.12 rows=50000 width=292) (actual time=3894.656..7765.298 rows=50000 loops=1) Hash Cond: (account6_.contactinformation_id = contactinf7_.id) -> Hash Left Join (cost=8656.51..19853.50 rows=50000 width=253) (actual time=3894.587..7565.762 rows=50000 loops=1) Hash Cond: (ace3_.eventinitiator_id = account6_.id) -> Hash Left Join (cost=8655.40..19403.56 rows=50000 width=192) (actual time=3894.468..7379.405 rows=50000 loops=1) Hash Cond: (ace3_.id = ace3_1_.id) -> Hash Join (cost=3591.00..10105.67 rows=50000 width=176) (actual time=3058.596..5371.813 rows=50000 loops=1) Hash Cond: (ace3_.id = this_.adcreatedevent_id) -> Seq Scan on adcreatedevent ace3_ (cost=0.00..2323.41 rows=149641 width=16) (actual time=0.038..1452.758 rows=149641 loops=1) -> Hash (cost=1818.00..1818.00 rows=50000 width=160) (actual time=1793.711..1793.711 rows=50000 loops=1) -> Seq Scan on roommateresidenceoffer this_ (cost=0.00..1818.00 rows=50000 width=160) (actual time=17.340..1584.689 rows=50000 loops=1) -> Hash (cost=2389.62..2389.62 rows=149662 width=16) (actual time=835.791..835.791 rows=149662 loops=1) -> Seq Scan on funalaevent ace3_1_ (cost=0.00..2389.62 rows=149662 width=16) (actual time=103.232..555.443 rows=149662 loops=1) -> Hash (cost=1.05..1.05 rows=5 width=61) (actual time=0.071..0.071 rows=5 loops=1) -> Seq Scan on account account6_ (cost=0.00..1.05 rows=5 width=61) (actual time=0.050..0.056 rows=5 loops=1) -> Hash (cost=1.05..1.05 rows=5 width=39) (actual time=0.046..0.046 rows=5 loops=1) -> Seq Scan on contactinformation contactinf7_ (cost=0.00..1.05 rows=5 width=39) (actual time=0.025..0.030 rows=5 loops=1) -> Hash (cost=37037.86..37037.86 rows=2331986 width=16) (actual time=9232.251..9232.251 rows=2331986 loops=1) -> Seq Scan on city city8_ (cost=0.00..37037.86 rows=2331986 width=16) (actual time=0.043..4694.169 rows=2331986 loops=1) -> Hash (cost=3365.40..3365.40 rows=77540 width=222) (actual time=2183.568..2183.568 rows=77540 loops=1) -> Seq Scan on residencedescription residenced19_ (cost=0.00..3365.40 rows=77540 width=222) (actual time=0.033..1875.987 rows=77540 loops=1) -> Hash (cost=37037.86..37037.86 rows=2331986 width=16) (actual time=8024.211..8024.211 rows=2331986 loops=1) -> Seq Scan on city city1_ (cost=0.00..37037.86 rows=2331986 width=16) (actual time=0.075..3488.792 rows=2331986 loops=1) -> Hash (cost=2413.73..2413.73 rows=208 width=157) (actual time=92.330..92.330 rows=1697 loops=1) -> Bitmap Heap Scan on gisfeature gf2_ (cost=22.54..2413.73 rows=208 width=157) (actual time=58.968..89.167 rows=1697 loops=1) Filter: (("location" && '0103000020E610000001000000050000009BC810BB85B8F83F01D42B98AA5D48409BC810BB85B8F83F4134414633804840D44ADA6E12F908404134414633804840D44ADA6E12F9084001D42B98AA5D48409BC810BB85B8F83F01D42B98AA5D4840'::geometry) AND (distance_sphere("location", '0101000020E6100000915731A6AAAA0240218436EFEE6E4840'::geometry) <= 15000::double precision)) -> Bitmap Index Scan on gisfeaturelocation (cost=0.00..22.49 rows=625 width=0) (actual time=58.505..58.505 rows=2761 loops=1) Index Cond: ("location" && '0103000020E610000001000000050000009BC810BB85B8F83F01D42B98AA5D48409BC810BB85B8F83F4134414633804840D44ADA6E12F908404134414633804840D44ADA6E12F9084001D42B98AA5D48409BC810BB85B8F83F01D42B98AA5D4840'::geometry) -> Hash (cost=1.09..1.09 rows=9 width=25) (actual time=21.261..21.261 rows=9 loops=1) -> Seq Scan on residencetype residencet22_ (cost=0.00..1.09 rows=9 width=25) (actual time=21.215..21.230 rows=9 loops=1) Total runtime: 31725.674 ms (42 lignes)