Re: Slow sql on one dataset, fast on others...how to use explain and optimize

2004-02-14 Thread mos
At 11:34 AM 2/14/2004, Are Pedersen wrote: I am running OPTIMIZE table and ANALYZE table each night on all tables and databases. Shouldn't the explain statement tell me what's going on...it says 9,1,1,7,1,6,1 on rows, and multiplied up its not much. 378 rows to examine should run fast. Are,

Re: Slow sql on one dataset, fast on others...how to use explain and optimize

2004-02-14 Thread Are Pedersen
I am running OPTIMIZE table and ANALYZE table each night on all tables and databases. Shouldn't the explain statement tell me what's going on...it says 9,1,1,7,1,6,1 on rows, and multiplied up its not much. 378 rows to examine should run fast. mos wrote: At 04:21 AM 2/14/2004, you wrote: Thi

Re: Slow sql on one dataset, fast on others...how to use explain and optimize

2004-02-14 Thread mos
At 04:21 AM 2/14/2004, you wrote: This SQL takes 2 minutes to run on one database, and seconds on another. The tables has the same indexes, but different number of rows in them. It could be you have deleted a lot of rows from the table and therefore it is fragmented. You may want to try optimizing

Slow sql on one dataset, fast on others...how to use explain and optimize

2004-02-14 Thread Are Pedersen
This SQL takes 2 minutes to run on one database, and seconds on another. The tables has the same indexes, but different number of rows in them. Slow database: persontbl2 = 25000 rows memberstbl = 196000 rows groupchildrentbl = 9000 rows structuretreetbl = 58000 rows structureacl = 8800 ro