Optimize All Tables In A MySQL Database

Oct 29, 2008

how exactly it helps?

mysqlcheck -o -u...

Like what it does to "optimize" them? Does it really help?

View 7 Replies


ADVERTISEMENT

MySQL Doubt: More DB's & Less Tables || More Tables Less DB's

Nov 2, 2009

im planning on designing a webservice, it will have a lot of data, spread in many tables.

The problem is that there will be tables created constantly (around 5 each day..)

All tables/data will be accessed equally, so I dont know how to set up the system, to create multiple databases, and balance the number of tables equally on each database, or create less databases and have a lot of tables on each one.

Which one has more efficiency?

View 5 Replies View Related

How Set Up Cron Job Auto Empty A Tables Of A Database

Dec 20, 2008

How to set up cron job auto empty a table of an database at specify time.

OS: Centos 5 64 bit , Cpanel: cPanel 11.24.4-R32486 - WHM 11.24.2 - X 3.9

View 11 Replies View Related

Why MySQL Tables Crash

Jul 15, 2009

This is something i was wondering about and never found any answers.

Based on your experience, what are the most common reasons mysql tables crash?

View 9 Replies View Related

How To Optimize The The Mysql

Aug 3, 2009

in Optimizing mysql Why because i am facing the high server load because of the mysql often

View 4 Replies View Related

How Can I Optimize My Mysql

Feb 23, 2008

my server has some forums on it,

and it need mysql with php to run,

i want to optimize the mysql to get better performance,

how can i check it my setting is ok and how can i do?

View 9 Replies View Related

What Exactly Is Optimize MySQL

Mar 30, 2007

Saw a few mention of optimizing mysql. Sounds like it will help with performance. What exactly is this and will my web host do this for us?

View 3 Replies View Related

Optimize MySQL

Feb 19, 2008

I recently got my first dedicated server and now have it all up and running. I would like to optimize mySQL for improved performance.

Server running: CentOS 5, Tomcat, mySQL 5

Most queries: Single line queries (SELECT * FROM table WHERE name='John')
NOTE: Most of my queries include the return of at least one blob (size range 100kb to 1Mb)

Server Specs: Dual Core Intel Pentium 3Ghz, 4GB RAM, 500Gb hard disk

Below is my current my.cnf file:

Code:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
max_allowed_packet=16M
skip-innodb
skip-bdb

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

I've looked through the mySQL documentation but there is no substitute for experience when it comes to these things.

View 6 Replies View Related

MySql Optimize

Aug 4, 2007

to optimize mysql for my server. What would the cost be?

View 14 Replies View Related

Convert All Mysql Tables To Utf8

Jul 8, 2008

I have a vbulletin (3.7.2) board with many mods installed (nearly 70) without a problem.

However, upon installing one new mod I got a database error stating:

MySQL Error : Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_general_ci,IMPLICIT) for operation '='

How do I change ALL tables in one shot (or sql query via phpmyadmin) from the two different collations to utf8?

Also, is utf8 suggested or better than latin1?

View 3 Replies View Related

Are There Any Ways To Replicate Just A Few Tables On Mysql

Dec 21, 2007

Is there no possible way I can slave just a few tables in mysql? instead of slaving the entire table on the main database server.

View 1 Replies View Related

Optimize MySQL Config For 768MB Of RAM

Apr 4, 2009

I have got a cPanel/WHM VPS with 768MB of RAM and am running MySQL 5.0.67-community

Can someone tell my what to put in it, or give me some tips on how to optimize MySQL

This is what I have in /etc/my.cnf right now:

Code:
[mysqld]
skip-bdb
skip-innodb

View 0 Replies View Related

Scripts To Optimize Mysql Configuration

Sep 21, 2007

Would there be any scripts that can optimize a Mysql configuration?

I remember seeing one but I forgot the name and lost the script

View 2 Replies View Related

How To Automatically Check And Repair Mysql Databases And Tables

Jul 16, 2009

I have cPanle shared account.

Is there a way to automatically check and repair mysql databases and tables, that can be scheduled as cron job?

View 9 Replies View Related

Mysql Deleted Several Tables Under High Server Load

Apr 27, 2007

we have mysql 5 setup and this morning at around 10:07 tables started disappearing as they were being accessed by different clients.

Databases that had 40 tables now had 30, etc. Only the tables that were attempted to be accessed were gone. This is the first time something like this has happened.

The following output was given:

This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware.

We will try our best to scrape up some info that will hopefully help diagnose the
problem, but since we have already crashed, something is definitely wrong and this may fail.

key_buffer_size=8388600
read_buffer_size=131072
max_used_connections=208
max_connections=500
threads_connected=156
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 1096188 K
bytes of memory

Hope that's ok; if not, decrease some variables in the equation.

thd=0xaf82930
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...

Cannot determine thread, fp=0xb143932c, backtrace may not be correct.

Stack range sanity check OK, backtrace follows:
0x816b1a0
0xaf1898
0x20
0x81ac49d
0x8182914
0x8189010
0x8189df1
0x818a738
0x818ae5c
0xaeb371
0x9c4ffe
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read [url]and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0xaf36620 = SELECT * FROM `sessions` WHERE `PHPSESSID` = '5e6775cd3c6f187d8c575127ba73be19'
thd->thread_id=113407
The manual page at [url]contains
information that should help you find out what is causing the crash.
mysqld: my_new.cc:51: int __cxa_pure_virtual(): Assertion `"Pure virtual method called." == "Aborted"' failed.

Number of processes running now: 0
070427 10:07:49 mysqld restarted
070427 10:07:50 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
070427 10:07:53 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 227822203.
InnoDB: Doing recovery: scanned up to log sequence number 0 227822203
070427 10:07:53 InnoDB: Started; log sequence number 0 227822203
070427 10:07:54 [Note] /usr/sbin/mysqld: ready for connections.

View 0 Replies View Related

Check My Mysql Config - Optimize Or Upgrade

Mar 17, 2008

we've currently got a 2 server setup, apache+mysql

Mysql server is a Xeon 3.2Ghz with 2Gb ram, scsi 73gb raid1 disks

Server has been running a while, steadily increasing in traffic. whilst 90% of the time it's running ok (load around 0.5 - 1.0, cpu around 25-50% busy mainly mysql, disk i/o around 3% busy) during heavy traffic times everything slows right down

At the moment the mysql box is only running mysql so we've allocated about 1.5gb out of the 2gb to mysql.

At present, when we get busy the apache server is queing up requests as it waits for the mysql server. Query log shows most queries are <1sec, any other's are being optimised but due to the nature of our website there are a few pesky queries (only occasionally being slow though).

question is, can this config be tuned any more or is it time for an upgrade - mainly ram to add more innodb buffers?

Here's the result of tuning-primer.sh

Code:
SLOW QUERIES
The slow query log is enabled.
Current long_query_time = 2 sec.
You have 9 out of 159346 that take longer than 2 sec. to complete
Your long_query_time seems to be fine

BINARY UPDATE LOG
The binary update log is enabled
The expire_logs_days is not set.
The mysqld will retain the entire binary log until RESET MASTER or PURGE MASTER LOGS commands are run manually
Setting expire_log_days will allow you to remove old binary logs automatically
See http://dev.mysql.com/doc/refman/4.1/en/purge-master-logs.html

WORKER THREADS
Current thread_cache_size = 384
Current threads_cached = 15
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 150
Current threads_connected = 4
Historic max_used_connections = 18
The number of used connections is 12% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
Max Memory Ever Allocated : 1 G
Configured Max Per-thread Buffers : 5 G
Configured Max Global Buffers : 803 M
Configured Max Memory Limit : 6 G
Physical Memory : 1.99 G

Max memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 82 K
Current key_buffer_size = 5 M
Key cache miss rate is 1 : 1862
Key buffer fill ratio = 100.00 %
Your key_buffer_size seems to be fine

QUERY CACHE
Query cache is supported but not enabled
Perhaps you should set the query_cache_size

SORT OPERATIONS
Current sort_buffer_size = 16 M
Current read_rnd_buffer_size = 7 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 4.00 M
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly
join_buffer_size >= 4 M
This is not advised

OPEN FILES LIMIT
Current open_files_limit = 11095 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine

TABLE CACHE
Current table_cache value = 5467 tables
You have a total of 732 tables
You have 155 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 255 M
Current tmp_table_size = 256 M
Of 21109 temp tables, 35% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.

TABLE SCANS
Current read_buffer_size = 7 M
Current table scan ratio = 929 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 1 : 117
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
Server is mainly Innodb due to previous row-locking issues.

View 4 Replies View Related

Big Mysql Database 4gb

May 11, 2008

i been trying to move my server.. But mysql database is quite big and restoring takes ages 10 12 hours.. is there anyway i can make it quick because database dump takes 10 15mins but restore takes 12hours and it should be a way to make that quick

View 14 Replies View Related

Rsync Mysql Database

May 19, 2009

how can i setup rsync to backup just mysql database (if possible) every 6 hours or so.

View 14 Replies View Related

Rebuilding MySQL Database

Apr 24, 2009

I have are the .frm, .MYD, .MYI how do I restore/rebuild the database?

View 3 Replies View Related

Reloading A Mysql Database

Jul 13, 2009

My server admin linked me to this:

[url]

I'm using a cpanel based server, but I can't get this to work.

It requires I be in a directory I figure (this step isnt included)

so I type cd /home/username/public_html/

And then i follow the commands. but it doesnt work.

Basically i need to take a mysql database that I uploaded to my directory, and load it back into a database. :@

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved