MySQL 5.5 brought many performance enhancements and expanded the feature set of the popular open-source RDBMS.

learn more… | top users | synonyms

1
vote
0answers
33 views

crossplatform mysql_install_db script in mysql 5.5.34 on Windows

I downloaded mysql-5.5.34-win32.zip and found out there is mysql_install_db.pl script. However mysql 5.5 documentation says: mysql_install_db is a shell script and is available only on Unix ...
2
votes
1answer
203 views

In MySQL, does the order of the columns in a WHERE clause affect query performance,why? [closed]

I have a query that doesn't use any indexes: SELECT 32, guid, 1, 1, 1, 0, 5 FROM test WHERE level >= 20 AND ( ( fun_GetIndexValue(data, 354) ...
19
votes
3answers
24k views

Why does InnoDB store all databases in one file?

It was convenient that MyISAM used to store each table in a corresponding file. InnoDB has made advancements in many aspects, but I wonder why InnoDB stores all databases in one file (ibdata1 by ...
1
vote
2answers
219 views

MySQL Synchronous Replication on Ubuntu 12.04 with DRBD

I have been looking around for some easy and open-source ways to handle database synchronous replication. DRDB on a Linux server seems to be one of the fastest and easiest methods to handle database ...
1
vote
0answers
103 views

Upgrading from MySQL 5.5 to 5.6 - timestamp issue?

I'm looking at upgrading my Percona Server setup from 5.5 to 5.6. Reading the upgrade docs from MySQL sounds mostly straightforward except for anything involving time/date columns. As far as I can ...
1
vote
2answers
412 views

Innodb table is taking randomly long time to execute the insert query and in show processlist showing as queryend/updating

Innodb table is taking randomly long time to execute the insert query and in show processlist showing as queryend/updating and it happens for the similar queries for the same table and the queries got ...
0
votes
2answers
155 views

Cannot stop MySQL 5.5 replication threads

We have a master-master replication setup using MySQL 5.5. On one of the servers I am trying to stop the slave thread, but without success. To ensure that the replication does not connect to a real ...
0
votes
0answers
27 views

On replicating all tables of a given database except for those starting with some pattern

I'd like a slave to replicate all tables of a given database except for those starting with some pattern, eg. those with names starting with 'nc' (non-critical, redundant denormalized tables). So I ...
1
vote
2answers
89 views

MySQL replication: slave not updated

This has been asked many times over but we really cannot get a simple Master-Slave Mysql (5.5.25) replication to work for our two dbs (FatTree and Torus). And no trace of error in the logs. The ...
1
vote
1answer
717 views

How to create trigger to update timestamp when record is updated or inserted in another table

I have a table t_task and a table t_taskaction with a foreign key to t_task. I would like to update timestamp from t_task that is refering the foreign key form t_taskaction with every update in ...
0
votes
2answers
87 views

mysql forbidden database names

I was wondering whether there were a list of forbidden (reserved) database names in mysql. For instance, mysql is obviously one. But is there a determinated list? I don't want to cover 99% in my ...
1
vote
1answer
111 views

Can I disable an account in mysql after x failed login attempts?

The question is in the title. I would like to disable accounts after x failed login attempts. Is it possible? Thank you
0
votes
0answers
26 views

Request for Help Optimizing a Query in MySQL

I have a query that is being used to report on the number of times a trigger in Zabbix, was fired by an event. For example, an event (not enough disk space) fires a trigger that sends an email to ...
0
votes
1answer
100 views

Database design [closed]

I have tables college and department. In college, I have serial-number and college-names, In department, i have nos, college-names and department-name. My challenge is that having a repeated ...
0
votes
0answers
54 views

InnoDB crashes frequently

My Innodb Engine is getting crashed frequently. I could not find the reason behind this. This is the error log: 140129 9:22:49 [Note] Plugin 'FEDERATED' is disabled. 140129 9:22:49 InnoDB: The ...
0
votes
0answers
45 views

Is this a normal query time for a left outer join type?

I have Employee Table - 80K records about 100 fields I have an app table - 8K records and 30 fields Then a subset of employee table also stored as table that has our divisions subset - call this ...
0
votes
2answers
272 views

Help my database isn't performing fast enough! 100M Merge with 6M need < 1 hour!

I have a server right now receiving more raw data files in 1 hour then I can upsert (insert -> merge) in an hour. I have a table with 100M (rounded up) rows. Table is currently MyISAM. The table has ...
0
votes
0answers
38 views

Caching data with MySQL and asp.net 2.0

I want to cache frequently used data. Is there simplest way to do this with asp.net itself? I am using framework 2.0. If i do this with MySQL technique how about innodb?? will this allow me to cache ...
0
votes
0answers
53 views

Mysql query getting hung!

I am using mysql 5.5. I create following temporary table: CREATE TEMPORARY TABLE IF NOT EXISTS tempdb.%s ( `count` int(10) NOT NULL, `m_class` enum('SMS','EMAIL') NOT NULL, ...
1
vote
2answers
802 views

Trouble with triggers and insert .. on duplicate key update

I have two tables with identical schemas. one is a "main" table that is pruned periodically and kept small. The other is a "reporting" table that is an archive of everything that ever was. For ...
0
votes
0answers
19 views

How do I keep old employees from LDAP data?

I have an LDAP feed that I run nightly and it makes several tables that run a lot of our internal websites. I simply get about 40 fields times 80K employees. The tables get overridden every night ...
0
votes
0answers
786 views

Why does CAST(1 AS SIGNED INTEGER) return a BIGINT on MySQL?

If I do CAST(1 AS SIGNED INTEGER) I always end up getting a BIGINT returned, for example: $ mysql -u root -p --column-type-info Enter password: --- Copyright and help message snipped for brevity --- ...
1
vote
1answer
52 views

Poor query performance in MySQL

I have a 10 million record table in a MySQL 5.5 InnoDB. It's running in a 16GB RAM server with good CPU and fast HD. When I run the following query SELECT DISTINCT knowledge_id, ...
0
votes
1answer
71 views

Slow MYSQL performance due to sub queries

Here is my query: SELECT BAL,NAME, (SELECT SUM(DR) FROM transaction WHERE NAME=TNAME AND DATE < '2000-05-01') AS DR , (SELECT SUM(CR) FROM transaction WHERE NAME=TNAME AND DATE < ...
0
votes
1answer
50 views

Annonymous user has no privileges, but still able to show databases?

Output of SHOW GRANTS FOR ''@'localhost'; GRANT USAGE ON *.* TO ''@'localhost' However, when I log in using my default user account, which is later defaulted to an annonymous account by mySQL as ...
0
votes
0answers
12 views

Performing a dump breaks replication

I have a master/slave setup in our production environment (MariaDB). I've found that when a dump is done on a schema that is heavily used, it causes the replication between the master & slave to ...
0
votes
0answers
43 views

What happens when an SSH session is terminated while a query is running?

I have a huge database on a dedicated server, whenever trying to modify the db I use PUTTY to establish an SSH connection and then do the work. Yesterday I started an INDEX query on an innodb table ...
0
votes
0answers
73 views

Alternative to TEMPORARY tables capable of re-opening in a query?

I use TEMPORARY table for calculation of temporary data, but TEMPORARY tables in mysql has a big limitation, which made it useless for me. A table cannot be re-opened in a query. This mean I cannot ...
0
votes
0answers
28 views

Query for multi-table search with concatenated fields

Thank you in advance for bearing with me, as I am new to database design and implementation. The Setup: I have a MySQL 5.5 InnoDB database with several tables, 4 of which are relevant to the problem; ...
0
votes
1answer
99 views

How to UPDATE MAX and MIN of a GROUP BY?

I have a SELECT query of a table with GROUP BY id col1 category 1 some 1 2 x 1 3 another 1 4 x 2 // should be removed 5 some 2 6 x ...
0
votes
1answer
161 views

Use string functions and arithmetic calculations in SQL query or by programming language?

I need heavy arithmetic and string functions for processing the data captured from mysql database. Which is preferred: mysql functions or programming language (e.g., PHP)? $result = ...
0
votes
3answers
684 views

Amazon RDS MySQL performance issues

I have published my website on Amazon EC2 (Singapore region) and I have used MySQL RDS instance for the data storage. Everything is working very fine except performance. It seems that all queries, ...
1
vote
2answers
92 views

Is column order reliable in UPDATE?

Can we reply on the order of columns in an UPDATE? SET @x = 0 UPDATE table1 SET col1=IF(col1 IS NULL, NULL, @x:=@x+col1), col2=IF(col2 IS NULL, NULL, @x:=@x+col2), col3=IF(col3 IS NULL, NULL, @x:=0) ...
0
votes
2answers
63 views

Grant access on a database to all users

I have a global database, as I all users should have access to it. Is it possible to grant permission on a database to all users? something like GRANT ALL ON my_database.* TO *@localhost; Even (for ...
0
votes
1answer
44 views

How can I efficiently search for all records from a given month, or a given year?

We have a couple queries that involve datetime fields. In particular, we are checking for things like SELECT field1, field2, ..., field20 FROM table WHERE MONTH(startDate) == 1 SELECT field1, field2, ...
1
vote
1answer
158 views

How to use LOW_PRIORITY for heavy queries?

I have scheduled heavy UPDATE queries at administrator level, and since they are heavy UPDATEs with multiple JOINs, consume a huge amount of resources. I do not want them to stop end users from ...
1
vote
1answer
251 views

column auto updated after 24 hours in mysql

i have a table T1 with column : Name State time mon 1 2014-01-09 11:23:00 tue 0 2014-01-07 14:40:00 wed 2 2014-01-08 09:23:00 thu ...
1
vote
1answer
66 views

Query result set

I've 1 query written in our legacy system. (using MySQL 5.5) Now, with growing data - the below mentioned query taking huge time. In our system, we've somewhat 2,000,000,000 (2 billion rows) approx ...
0
votes
1answer
559 views

MYSQL - Problem with foreign keys on same table

In Mysql 5.5, I have a table, in which I store some informations about "events".. In order to have a chronological order, I made two columns that reference to the previous and to the next event. So I ...
0
votes
1answer
53 views

Few Insert queries rollbacked due to system crash

Well, this problem occured to me first time. Yesterday, one of our mysql system server crashed and when it restarted last few inserts were completely rollbacked. I am sure that they were proper ...
0
votes
0answers
77 views

Cannot find /etc/init.d file in opensolaris

While installing MySQL , I noticed a point, I mean to start the MySQL server manually , use the command cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql The error shown is : cp: ...
1
vote
2answers
81 views

Indexes slowing Insertions(Can't use Explain Insert to Analyse)

I have a MySQL database, I am parsing files from a log and inputting it inside. So far including a simple 4MB file in the database could take me about 4 minutes to insert ! and i have about 10,000 ...
1
vote
1answer
134 views

char vs varchar in mysql

I was reading the book MySQL high performance, it has mentioned that : CHAR is also better than VARCHAR for data that’s changed frequently, because a fixed-length row is not prone to ...
0
votes
0answers
35 views

I can't get MySQL server to stop running

The output from MySQL Workbench when I try to stop it is: Executing '/usr/local/mysql/support-files/mysql.server stop' 2013-12-23 21:08:29 - Stop server: ERROR! MySQL server PID file could not ...
0
votes
0answers
100 views

MySQL Load Avg High — CPU bound or IO Bound or Memory Issues

We are using MySQL 5.5 and the database is approximately 10TB. The load avg is constantly high during day time. Following are the configurations and a snap shot of a 'top' command. I wanted ...
1
vote
1answer
161 views

MySQL with high CPU and memory usage

here we have a VPS with 3.2GHz quadcore processor with 2GB of RAM and 4GB of SWAP which need to work with a high intensive legacy system (read: bad coded). The main problem is that the CPU (~80 - ...
2
votes
2answers
370 views

How to SELECT rows with time duration stored in varchar column?

There is a column in table defined like this : duration varchar(10) It has value for duration of a MP3 file stored in it like : 52:19 (Minutes : Seconds) How can I create a SQL query, for ...
1
vote
1answer
830 views

Query State hangs on sending data

For some reason, the query state hangs on "Sending Data" (using show processlist;) and I have no idea why. This is the table creating script: CREATE TABLE IF NOT EXISTS `esp_game` ( `gameID` ...
0
votes
1answer
297 views

Unable to take backup of mysql database using Xtrabackup

I am trying to take mysql backup without any downtime but unable to take the backup using Xtrabackup . Actual Database is almost about 40+ GB in size. I am trying to first satisfy myself. Hence, I ...
3
votes
2answers
1k views

What is the meaning of tinyint(N)?

When we use an argument length with numerical data types, as far as I know this specifies the display width. I tried the following: mysql> create table boolean_test (var1 boolean, var2 tinyint); ...