Re: Why would it make such a difference to move mysqld to anothermachine?

2008-07-07 Thread John Almberg
Yes, that could be the case if the database was transferred by  
doing mysqldump

on the first machine and then loading the dump on the second.


This is indeed what I did.

Odd that you ask this question, because my very first guess about  
this issue was that the database was corrupted in some way. However,  
I could not find any evidence of corruption, per se.


I didn't realize that mysql records could become 'fragmented'... I  
guess this means the records are fragmented on disk as the database  
file is updated over time.


The records in question (mainly product data) are not changed very  
often, and had been moved (using mysqldump) to this new machine in  
the last 6 weeks or so. So this doesn't sound like a likely cause.  
However, a very interesting thing to know...


-- John
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Why would it make such a difference to move mysqld to anothermachine?

2008-07-07 Thread Matthew Seaman

-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

Bob McConnell wrote:
| On Behalf Of Mel
| On Sunday 06 July 2008 10:58:54 Matthew Seaman wrote:
| 
|>> I suspect that you could have achieved a pretty good speed-up simply

| by
|>> adding another hard drive to your server and moving all of the
| database
|>> onto it, separate from the web root and any other areas which apache
|>> would be doing a lot of read/write operations on.
| 
| I have not been following this thread closely, and I don't know much

| about MySQL, but I do have a question here. Is it possible that the
| process of moving the database to the second machine also resulted in
| cleaning up (defragmenting?) the files and reordering some tables to
| more closely match their indexes? Would this reduce the response time on
| the new server, at least until a significant amount of additional data
| was added that reverses these effects?

Yes, that could be the case if the database was transferred by doing mysqldump
on the first machine and then loading the dump on the second.  It wouldn't be
the case if the data were transferred just by tarring up the DB data directory
and copying it over.

You can achieve the same effect by running 'OPTIMIZE TABLE foo;' from within
MySQL or using 'mysqlcheck --optimize ...'.  However, the scale of improvement
described is rather more than can generally be achieved by table optimization.

Cheers,

Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.   Flat 3

~  7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
~  Kent, CT11 9PW, UK
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREDAAYFAkhyG7UACgkQ3jDkPpsZ+VYDJwCgtaV/BOE+YqGICUEVht3y40Ga
7oAAn2nQOZjZ7oJsSXAi4KsoNXi8R0Vh
=efqJ
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Why would it make such a difference to move mysqld to anothermachine?

2008-07-07 Thread Bob McConnell
On Behalf Of Mel
On Sunday 06 July 2008 10:58:54 Matthew Seaman wrote:

>> I suspect that you could have achieved a pretty good speed-up simply
by
>> adding another hard drive to your server and moving all of the
database
>> onto it, separate from the web root and any other areas which apache
>> would be doing a lot of read/write operations on.

I have not been following this thread closely, and I don't know much
about MySQL, but I do have a question here. Is it possible that the
process of moving the database to the second machine also resulted in
cleaning up (defragmenting?) the files and reordering some tables to
more closely match their indexes? Would this reduce the response time on
the new server, at least until a significant amount of additional data
was added that reverses these effects?

Thank you,

Bob McConnell
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"