Reinder Menninga wrote: > Hi, > > We tried to use the new database and at first it seemed to work. But the > performance is terrible. Some queries take over 200 seconds to execute. > All constraints and indexes seems to be imported oke from the 7.4 > postgres database. > > For example this query took more than 4000 seconds: > SELECT > contentelementen.notitie,contentelementen.owner,contentelementen.number, > contentelementen.vrijetekst6,contentelementen.datum2,contentelementen.da > tum1,contentelementen.vrijetekst5,contentelementen.vrijetekst4,contentel > ementen.vrijetekst3,contentelementen.vrijetekst2,contentelementen.vrijet > ekst1,contentelementen.elementtype,contentelementen.titel,contentelement > en.body,contentelementen.toontitel,contentelementen.getal2,contentelemen > ten.getal1,contentelementen.boolean2,contentelementen.boolean1,contentel > ementen.otype,contentelementen.intro,root0.number,insrel.number,contente > lementen.number FROM cpb_contentelementen root0,cpb_insrel > insrel,cpb_contentelementen contentelementen WHERE root0.number=888 AND > ((root0.number=insrel.dnumber AND contentelementen.number=insrel.snumber > AND insrel.dir<>1) OR (root0.number=insrel.snumber AND > contentelementen.number=insrel.dnumber)) LIMIT 1 > > Does mmbase 1.7.1 support postgresql 8.0.13?
Did you vacuum your tables after the import? Did you configure postgresql so that it has enough memory (the defaults are quite low)? A few things that are certain to speed things up: * Always create named relations between any two tables (for example 'employee_salary'); you'll have separate typerels with different rnumbers in the insrel table. Make sure there's an index on insrel.rnumber too (IIRC there is one by default). You may want to cluster insrel on that index. * Always specify the direction of your relations (as already mentioned). -- Alban Hertroys [EMAIL PROTECTED] magproductions b.v. T: ++31(0)534346874 F: ++31(0)534346876 M: I: www.magproductions.nl A: Postbus 416 7500 AK Enschede // Integrate Your World // _______________________________________________ Developers mailing list [email protected] http://lists.mmbase.org/mailman/listinfo/developers
