vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| > look at this: > select count(*) from fotos where archivo not in (select archivo from > archivos) > Aggregate (cost=4899037992.36..4899037992.37 rows=1 width=0) > -> Seq Scan on fotos (cost=22598.78..4899037338.07 rows=261716 width=0) > Filter: (NOT (subplan)) > SubPlan > -> Materialize (cost=22598.78..39304.22 rows=805344 width=58) > -> Seq Scan on archivos (cost=0.00..13141.44 rows=805344 > width=58) > > I WILL DIE WAITING FOR QUERY RESPONSE !!! Try: select count(*) from fotos f where not exists (select archivo from archivos a where a.archivo = f.archivo) select count(*) from ( select archivo from fotos except select archivo from archivos ); ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| ||||
| On Wed, Oct 26, 2005 at 08:05:21AM -0400, Merlin Moncure wrote: > select count(*) from fotos f where not exists (select archivo from archivos a where a.archivo = f.archivo) This was an optimization before 7.4, but probably isn't anymore. /* Steinar */ -- Homepage: http://www.sesse.net/ ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |