Page 1 of 1

Building Indexs for mysql

Posted: Fri Apr 28, 2006 10:09 pm
by Capt Mike
Does S9y automaticly build and index for mysql?
Does anybody body have an index for s9y, because I would think it would be the same for every install, but what do I know.

If I have to build them how do I do that? Looks like a lot of work..

Hey Gavin, I went your "make me happy site" in is all in German... which is a bit beyond me....sorry.

If I go to English Amozon then spider man will be in english... :cry:

But, my site is really slow as you pointed out, how do I fix this...

www.stgeorgebroadcasting.com

Thanks Mike

Re: Building Indexs for mysql

Posted: Sat Apr 29, 2006 1:02 pm
by garvinhicking
Hi!

Yes, s9y automatically creates indices. Your SQL user account must have the INDEX Privilege for that.

Have a look at the sql/db.sql file and search for "CREATE INDEX". Have a look with your phpMyAdmin or something similar and look if indices exist for the serendipity_entries table?
Hey Gavin, I went your "make me happy site" in is all in German... which is a bit beyond me....sorry.
Yes, sadly Amazon does not offer an english interface to it. :-( But then again, I also have a paypal account... *eg*

Best regards,
Garvin

found indices

Posted: Sat Apr 29, 2006 2:24 pm
by Capt Mike
Ok, it did make them

it made four,
Primary, timestamp, isdraft, authorid

So on to my next problem, why is my site slow.

www.stgeorgebroadcasting.com

Thanks Gavin

Where is your paypal, your email?

Re: found indices

Posted: Sat Apr 29, 2006 2:47 pm
by garvinhicking
Hi!

Your site being slow can have multiple reasons. I think last time I checked it boiled down to your mysql server being pretty, pretty slow. To get a benchmark of your server, you can do this:

1. Open your file include/db/mysql.inc.php.
2. Search for the function serendipity_db_query
3. Find this code:

Code: Select all

    if ($expectError) {
        $c = @mysql_query($sql, $serendipity['dbConn']);
    } else {
        $c = mysql_query($sql, $serendipity['dbConn']);
    }
replace it with this:

Code: Select all

    $start = microtime_float();
    if ($expectError) {
        $c = @mysql_query($sql, $serendipity['dbConn']);
    } else {
        $c = mysql_query($sql, $serendipity['dbConn']);
    }
    $end = microtime_float();
    $fp = fopen('mysql.log', 'a');
    fwrite($fp, $_SERVER['REQUEST_URI'] . " - " . $_SERVER['REMOTE_ADDR'] . " - " . round($end-$start, 4) - ": " . str_replace("\n", "", $sql) . "\n");
    fclose($fp);
4. Open the main page of your blog.
5. Now a file "mysql.log" should be created in your serendipity dirrectory. It contains every SQL query. Add up all times for your request and see if some queries stand out. If the total time spent for queries does not add up to the total time a request takes, it's not MySQL making the trouble.

In that case you'd need to report me which event and sidebar plugins you have installed. It can be that specific plugins are slow.

Regarding paypal: Have a look at my signature. :)

Regards,
Garvin

Posted: Sun Apr 30, 2006 9:30 am
by Capt Mike
I have run the scripts yet, but I did, turn on the task master, and watched the performance.

Yikes!!

100% CPU every time I reload the site boom

This is awful, it is overload my cpu.... :cry:

If have any real traffic im doomed. Panic.

I will run the script, however this is not easy for me, being uneducatied in mysql

failed

Posted: Sun Apr 30, 2006 9:43 am
by Capt Mike
I follow the dirctions;

I got a fatal error when I reloaded the site.

Is the script correct?

where is the log?

sorry,

Mike

Re: failed

Posted: Sun Apr 30, 2006 12:37 pm
by garvinhicking
Which fatal error? Without error messages, I can't help you. :)

You were running a windows server, right? IIS or Apache? Windows servers can be ugly some times. How much RAM does the machine have, which hardware is it?

Regards,
Garvin

My Puuter

Posted: Tue May 02, 2006 11:03 am
by Capt Mike
MS server 2003
standard Edition
sp 1

Intel celeron CPU

2.40 GHZ
1 Gig Ram

I the fatal error: I cant remember, it was something like, png_plugin ???

It is not doing this anymore.

If you still have the email I send you the password to the remote desktop is still the same.

Re: My Puuter

Posted: Tue May 02, 2006 12:33 pm
by garvinhicking
Hi!

Okay, if the error no longer shows up, it should be okay :)

I don't have the password anymore; my policy is to delete passwords after a problem was solved. So if you like me to have another look, please send your mail again :-)

Best regards,
Garvin

found the plugin

Posted: Fri May 05, 2006 9:39 am
by Capt Mike
/index.php?/plugin/pngbehavior.htc

This is the one that seem to be slowing things down. This is my guess, but when I get fatal error this is the one that pops up. I have no idea what I am doing, so take it with a grain of salt, as they say.

:D

Re: found the plugin

Posted: Fri May 05, 2006 10:00 am
by garvinhicking
Hi!

You could remove that part if you disable the "browser compatibility" plugin! Try it.

Regards,
Garvin

Re: found the plugin

Posted: Fri May 05, 2006 10:16 am
by garvinhicking
Hi!

You could remove that part if you disable the "browser compatibility" plugin! Try it.

Regards,
Garvin