1
vote
1answer
732 views

MySQL Queries taking too long to execute

I have a database table, with 300,000 rows and 113.7 MB in size. I have my database running on Ubuntu 13.10 with 8 Cores and 8GB of RAM. As things are now, the MySQL server uses up an average of 750% ...
1
vote
3answers
127 views

MySQL high cpu load slow quries being logged need help to understand

I'm trying to troubleshoot a high load problem on a server, Today for some reason MySQL is taking up excessive CPU time. I have enabled slow-queries and found this query and others similar. The ...
4
votes
2answers
360 views

What is the most efficient way to add a lot of data to a mysql database?

I have a batch of data that needs to be added to a mysql database every day consisting of about 100K queries. START TRANSACTION; INSERT IGNORE INTO info (Created, Modified, MType, Pform, Name, ...
-1
votes
3answers
624 views

Redirect MySQL queries to another server [closed]

In order to lower system usage I'm planning to use another server to store my databases. so how can I redirect MySQL queries to another server or make MySQL to store databases on another server?
-1
votes
1answer
725 views

How to speed up a MySQL Import [closed]

I posted a related question on askubuntu.com, but this may be a better place and way to ask it. I'm working on a way to speed up a db import. Currently the import is taking a week, give or take a few ...
5
votes
2answers
140 views

Effects of internet connection speeds on server queries

Can my internet connection significantly effect queries run on phpmyadmin? I am currently 18 down and 30 up. I switched internet connections today and noticed a deep drop in query performance. The ...
1
vote
2answers
41 views

Is it possible to use workbench to connect to a linux server and send the output to a csv or text file?

I have a user that is using workbench to connect to a Linux MySQL Server and would like to have the query results sent straight to a csv or text file on his computer. I know how to do it if I were ...
0
votes
1answer
752 views

MySQL slow query log logging all queries

We have a MySQL 5.1.52 Percona Server 11.6 instance that suddenly started logging every single query to the slow query log. The long_query_time configuration is set to 1, yet, suddenly we're seeing ...
0
votes
0answers
236 views

Remote mysql server slow

I need some help on speeding websites loading. I have two virtual machines created on my ESXi host. Thay are both on public IP addresses and that is how they communicate. On one virtual machines I ...
8
votes
3answers
7k views

How to automatically kill slow MySQL queries after N seconds?

I am looking for a well tested bash script (or alternative solution) to do so, in order to avoid max_connection to be exhausted. I know that it is fighting the symptoms, but really need such script as ...
0
votes
2answers
1k views

SQL query to Automatically Export to file and FTP?

I am wondering if there is such a way to automatically run SQL queries and export to file (example: csv file) and then FTP to desired location? It seems simple and would need something like this as it ...
1
vote
1answer
478 views

Measure query execution time in bash

I need to measure a query total execution time from inside a bash script. Somebody told me to submit something like: mysql --user="someuser" --password="pw" -D "dbname" -e 'your-sql-command;' Is ...
1
vote
2answers
537 views

Mysql server high trafic makes websites really slow or unable to load

Lately we have been having a lot of problems with our mysql server, from websites being really slow or even unable to load them at all. The server is a dedicated server that only runs our mysql ...
0
votes
1answer
547 views

How to create one update query (mysql) on multiple databases

I have several DBS on the same mysql server. The DBS's structure and schema are exactly the same (only data is different) the query on certain db works well like this (written in phpmyadmin) UPDATE ...
0
votes
1answer
125 views

Mysql slow query log not tally with mysqladmin

I have enabled my slow query log. So I saw the query which was taking some time then I did some indexing it improve and my slow query log is not being showing any more queies. But when I run this ...
-1
votes
1answer
71 views

Slow Query in Big Tables by a field has INDEX [closed]

i don't understand the problem in this query, when I make a query with a condition of category_id = 'XX' the query take MINUTES to execute, but the same query without filter by category_id take 0.09 ...
1
vote
2answers
803 views

Estimating MySQL Query Runtime

I ran a MySQL query from command line using the following: nohup mysql --user=root --password=XXXXXXXXX database < report.sql > results.tab This query is extensive (5000 lines) and running a ...
1
vote
3answers
436 views

Need to fetch result of only one column from the MySQL status variables

I wanted to fetch only the value from status variables. Suppose the query is show status where Variable_name='Aborted_clients' It returns +-----------------+-------+ | Variable_name | Value | ...
0
votes
4answers
168 views

Can MySQL “Query” be exploited (while processing to Server)?

(Not like/about MySQL Injection) I wanna just be confirmed that someone told me a query can be changed (or) modified (by someone intruder/hacker, from middle) while we submitting it. Is it possible? ...
0
votes
1answer
350 views

How can I cap the MySQL query log size?

I have Investigated enabling MySQL query logging. At some point, soon, it would be nice to enable this on my companies production server so that if there is ever a question about queries run against ...
2
votes
2answers
128 views

MySQL query times for tuning are different every time

I am tuning SQL query time for my slow query but every time I get different times so I can't evaluate my optimize solution. For example, I run query select * from abc where abc.status in (x,y,z) and ...
0
votes
1answer
222 views

A pseudo-Sql server to intercept and see all MySQL queries

I would like to setup a "pseudo-server" to intercept all the SQL queries made by my local application. The reason for that is that I can't administer the Mysql server, and it's difficult for me to ...
5
votes
2answers
1k views

best practice for fixing mysql slow query log error 13

CentOS 5.5 MySQL 5.5 installed via a yum repository [ERROR] Could not use /var/log/mysqld.slow.log for logging (error 13). Turning logging off for the whole duration of the MySQL server process. ...
1
vote
2answers
245 views

Mysql crashes by some strange queries

I have some strange log entries in my debug where I see that the mysql crashes: Apr 13 08:51:16 cronjob1 mysqld[22953]: Attempting backtrace. You can use the following information to find out Apr 13 ...
0
votes
1answer
325 views

MySQL database server on a VPS: can it handle the spike in traffic I'm anticipating?

I have VPS service with Hostican.com. 2.7GHz CPU, 2GB RAM (level 5, if you look at the site). I have a smartphone app that makes requests to PHP forms, which query the MySQL DB. I'm anticipating a ...
0
votes
1answer
135 views

MySQL's Query Optimizer's take on disk access time

I don't have a ton of background with MySQL, and I was wondering of anyone can give me some insight into MySQL's query optimizer and the impact on the cost of disk accesses in determining a query plan ...
0
votes
1answer
148 views

optimize mysql queries perfomance and speed

i need some help in some mysql queries i'm trying to improve it's performance and speed i'm trying to figure out how to do that using mysql syntax . here is an snippet of a query function i use ...
0
votes
1answer
287 views

Simple MySQL query locking up until database restart

I have a very simple query that runs in 216ms on my development machine but was taking more than 45 seconds on my production server, that is, until I restarted MySQL there: UPDATE `forum_categories` ...
0
votes
1answer
219 views

A Most Puzzling MySQL Problem: Queries Sporadically Slow

This is the most puzzling MySQL problem that I've encountered in my career as an administrator. Can anyone with MySQL mastery help me a bit on this?: Right now, I run an application that queries my ...
0
votes
1answer
125 views

How to search MySQL table for duplicates

In MySQL, I have a table named "city" with "city_name" and "latitude" and "longitude" in it. It appears that I have a few duplicates. What query can I run (in phpmyadmin) that will search through the ...
1
vote
2answers
412 views

Cancel query in MySql

I have a query running for some hours, if I cancel this query what is going to happen to the database? The query is an ALTER TABLE that adds a new column. UPDATE: I executed the script this way ...
0
votes
2answers
172 views

Is there a way to find out the detailed statistics of the querys that processed by Mysql?

The load average of my service is high, always around 15. And the reason for that is the Mysql is overloaded. I'm wondering How Can I find out which specific query/script consume the most Mysql ...
0
votes
2answers
57 views

MySQL stop responsing when modify main tables

It's an InnoDB database. The query cache has 1.2GB in size with 300k queries in the cache. Most of the cached queries are related to 3 major tables (260MB data length plus 600MB index length ...
0
votes
2answers
170 views

MySQL server has gone away occasionally on simple select query

For many weeks I have had a problem with a simple SQL query where from time to time the MySQL server has crashed. But recently it is crashing every day, 1-2 times a day. The query is very simple: ...
0
votes
1answer
344 views

MySQL 5.1 Slow SHOW DATABASES (phpMyAdmin)

We have about 200 databases and since upgrading from 4.1 to 5.1 we've noticed that PHPMyAdmin takes a while to load the left navigation sometimes. Is there anything we can do to make this quicker? ...
1
vote
1answer
261 views

mysql slow query log

I am trying to write a script to parse the MySQL slow query log. I have seen 1 or 2 parser. does anyone know how to extract the information from that log? I mean does anyone know the structure of the ...
1
vote
1answer
2k views

Handler_read_rnd is too high (more than 2GB)

I am running an advertising program and there are some SELECT, UPDATE and DELETE queries when showing ads. Sometimes, displaying ads is fast but sometimes it is too slow. At this time, it is slow and ...
0
votes
1answer
276 views

SQL Query fields change to uppercase on upload to server

I have just finished developing an app using CodeIgniter. When I upload it to my Host (Hostgator shared) some of the SQL text is converted to uppercase and rendering the app unusable. In my database ...
1
vote
3answers
318 views

“Delete query” not able to be completed

I have a very simple mysql script that is running. But it hangs, and runs forever without finishing. What are possible reasons, and how can I resolve them? delete from guid_target_infos where type_id ...
2
votes
2answers
588 views

A more useful MySQL Query log that's suitable for tail -f'ing

In order to debug a webapp and mysql queries, I've enabled the mysql query log. However it's not a very good format to tail and grep through. Ideally I'd like to be able to only show queries from a ...