Building Indexs for mysql

Having trouble installing serendipity?
Post Reply
Capt Mike
Regular
Posts: 63
Joined: Sat Mar 11, 2006 11:43 am

Building Indexs for mysql

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Building Indexs for mysql

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Capt Mike
Regular
Posts: 63
Joined: Sat Mar 11, 2006 11:43 am

found indices

Post 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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: found indices

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Capt Mike
Regular
Posts: 63
Joined: Sat Mar 11, 2006 11:43 am

Post 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
Capt Mike
Regular
Posts: 63
Joined: Sat Mar 11, 2006 11:43 am

failed

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: failed

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Capt Mike
Regular
Posts: 63
Joined: Sat Mar 11, 2006 11:43 am

My Puuter

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: My Puuter

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Capt Mike
Regular
Posts: 63
Joined: Sat Mar 11, 2006 11:43 am

found the plugin

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: found the plugin

Post by garvinhicking »

Hi!

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

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: found the plugin

Post by garvinhicking »

Hi!

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

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply