PDA

View Full Version : Reeeeeally Long SELECTs


Double Negative
20th of March 2006 (Mon), 11:33
Pekka, I just recently installed EE 1.5rc4 on a Sun Solaris box running Solaris 10, Apache 2.0.55, MySQL 5.0.19, PHP 4.4.2 and eAccelerator 0.9.4... I noticed that when pulling up the main index page it's very fast, but try to click on an exhibition - either 80 photos or just one, and the SELECT query sits there for a long, long time. Eventually the page is generated.

It's a Sun Enterprise 420R server with 4x450MHz UltraSPARC IIs, 4GB of RAM and running off a RAID 0+1 over Gigabit Ethernet - so I don't think it is the server. ;)

This is after upgrading from MySQL 5.0.18, PHP 4.4.1 and eAccelerator 0.9.4rc2 (IIRC), so I know it's not those components. All updated and freshly compiled now.

I thought I got it working when rebuilding the indices and zeroing out the page view counters, but no go.

I can post up the exact SELECT statement if you'd like.

I am planning on installing it on an Apple Mac box to see if a total platform change might help, just in case there's something fishy with this one.

Pekka
20th of March 2006 (Mon), 14:56
PM me the query and I'll take a look. If you put a debug mode on while you test it briefly you can see if the delay is actually caused by the main query or something else.

I have not tested EE with MySQL 5 yet, but queries are so simple there should be not problems.

Double Negative
20th of March 2006 (Mon), 16:20
Yeah, I didn't think MySQL 5.x would cause any harm - like you said, the SQL seems pretty straightforward. PHP 4.x is fine, right? It doesn't need 5.x?

I hadn't thought to enable debug mode. I've just enabled it.

In php.ini, safe_mode is off yet in the sidebar it says, "betanote: safe mode is on" - odd, no?

PM forthcoming - and thanks for the help.

Pekka
21st of March 2006 (Tue), 15:22
This was fixed by some table maintenance - indexes were not active.

Double Negative
21st of March 2006 (Tue), 15:49
Solved! Pekka is the man. :)

Thank you, thank you.

karim
1st of April 2006 (Sat), 17:27
This was fixed by some table maintenance - indexes were not active.

Hi Pekka, I'm experiencing the exact same problem. Started happening after the web hosting company moved to new servers...

Could you tell us what exactly you did to fix this?

Thanks

k

Double Negative
1st of April 2006 (Sat), 18:12
Export the DB and reimport it. Run analyze/repair from within EE and then optimize with both options, again in EE. You should be good to go!