MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
1answer
933 views

Slow performance of MySQL Join Query

I have inherited a site (running Coldfusion8 and MySQL 5.0.88) with a product search using multiple criteria. I'm struggling with optimizing the search, especially a pricelist check, which makes the ...
2
votes
2answers
859 views

Why are parallel writes in MySQL as slow as sequential writes?

I have many MySQL write-only processes. They all go to the same MySQL master. I run them sequentially to get a baseline time. I basically chain together several mysql command-line clients, ...
2
votes
3answers
1k views

whether a big (but not used) ibdata1 slow anything down

Hi I have an ibdata1 that is around 10 gig. I have gradually migrated to 'file per table' using the innodb_file_per_table=1 option such that there are no big tables in ibdata1 anymore. I recently ...
3
votes
1answer
336 views

ETA: translate Oracle SQL queries to MySQL

task: replace Oracle 11g with MySQL current setup: Oracle 11g SE One about 80 tables stored procedures, PL/SQL are in place but out of scope for this question client applications do not use a ...
1
vote
1answer
277 views

extremely slow MyISAM slave updates

I have 2 slaves and one is working as expected. The other slave is extermely slow while executing the "update" statements. The insert and deletes are fast. I used "check table tbl_name" to see if any ...
2
votes
1answer
1k views

MySQL's “slow query” log: strange “Query_time”

I need some help understanding what's going on with my "slow query" log in MySQL. I have set set global long_query_time=3 and yet this is what I see in the slow query log: # Time: 120723 9:04:38 ...
3
votes
2answers
663 views

Scalable DBaaS that can scale to hundreds of terabytes with easy backup and restore

I've gone over many DBaaS solutions, including Xeround (limited to 50G, in memory), NuoDB (currently in beta 7), DrawnToScale (not out yet), MongoDB (in memory), RavenDB (for ASP.NET, but NoSQL) and ...
3
votes
1answer
75 views

Merge queries into one

The following 2 queries are working as expected and they show the count. Is it possible to merge them into single query? I need sum_hits columns to be part of the rest of the column shown in the ...
4
votes
1answer
1k views

InnoDB : Deadlock from one reader and one writer

This sort of has me miffed. One query is doing a select that includes a table that is undergoing a heavy UPDATE, but that update takes under 1/2 a second, and there are no other writers to that ...
3
votes
1answer
224 views

Why are my queries getting really slow?

I own a WordPress installation, and Updated to 3.4.1. After the upgrade, I experienced a very strange slow-down. After all, I used the define('SAVEQUERIES', true); in my wp-config.php with ...
3
votes
1answer
1k views

How to restrict multi-tenant MySQL database?

I have following table: Create table `webservice`( `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, `hostname` text NOT NULL, `portalid` int NOT NULL, `serviceid` int NOT NULL, `customerid` ...
2
votes
2answers
3k views

How to improve MySQL Server Performance..??

As a MySQL DBA most of the times we are supposed to optimize a poorly performing MySQL Servers. Now my question is where to start from like we will need to find out many things as 1.Find the ...
3
votes
1answer
2k views

Setting up replication for MyISAM tables?

Before setting up a replication within MySQL, the data first needs to be transferred to the slave. Since MyISAM tables can be copied as files. Would it be okay to copy MyISAM files, .myd .myi .frm, ...
4
votes
3answers
1k views

Optimizing DELETE Query on MySQL MEMORY Table

I run a large forum which maintains a MySQL database for backend data storage. The 'session' table tracks logged in users & guests. It is currently about 100k records, so not really that large. ...
1
vote
1answer
136 views

Reviewing all new MySql queries on staging environment

The problem I am trying to solve: It's well known that not all developers know what is EXPLAIN in MySql, and not every knows how to use it. Large part of them consider MySql as a black box, no matter ...
3
votes
4answers
2k views

Optimising MySQL

As per this post, it looks like I'm having some serious issues with MySQL optimisation. Unfortunately, I have no idea where to start! I'm running a DirectAdmin-based CentOS dedicated server. It's an ...
1
vote
1answer
65 views

What is really wrong with this query please? [closed]

SELECT CONCAT_WS(parent_title, parent_fname, parent_sname) AS 'Parent' CONCAT ('£1.50', sum(activity_price) AS Amount, COUNT(*) AS 'N.Activities' FROM Activities A, Parent P, Child C, Register R WHERE ...
11
votes
3answers
12k views

Why is 'LOAD DATA INFILE' faster than normal INSERT statements?

I've read an article that mentioned we can achieve 60,000 inserts per second by LOAD DATA IN FILE statement that read from csv files and insert it into database. Why should it differ from normal ...
3
votes
1answer
4k views

Why full-text-search returns less rows than LIKE

I don't get full-text-search working as I want it to, and I don't understand the differences in the resultlists. Example statements: SELECT `meldungstext` FROM `artikel` WHERE `meldungstext` LIKE ...
2
votes
1answer
460 views

Database schema size result differs from file size when exported

I used this query to find out my database size SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY ...
33
votes
7answers
42k views

How do I completely disable MySQL replication

I am running dual master MySQL replication and now want to move to a single database with no replication. How do I completely disable replication on both databases?
5
votes
1answer
553 views

MySQL replication - replicate to multiple DBs on slave?

I've got a single table in a master DB that I would like to replicate to multiple databases on one slave server. Like this: masterDB.tableA -> slaveDB1.tableA masterDB.tableA -> slaveDB2.tableA ...
3
votes
1answer
671 views

Table was not locked with LOCK TABLES when recreating an index

I have a weird problem when recreating the index. This is what happens. This is done through JDBC, in Java btw. A table 'stuff' is truncated by a process. The application is reinitalizing a cycle ...
3
votes
2answers
337 views

Writing transactions to .MYD file to take Backup

I'm trying to backup MySQL DB by archiving the data directory of required databases. I'm doing FLUSH TABLES WITH READ LOCK before taking the backup, but even then some of the transactions were not ...
2
votes
3answers
1k views

MySQL backup with no downtime [closed]

I'm running a M/S replication of MySQL 5.5 / innoDB (over ubuntu). My DB is pretty large: ~250GB. I'm looking for a backup tool/service that will do the following: full backup no downtime / locks ...
1
vote
1answer
547 views

Mysql Commands out of sync; you can't run this command now

I have a script which is heavily doing select and insert nearly every seconds without fail and the total queries varies from a second to another. Below is the results of running the queries and ...
1
vote
1answer
777 views

decreased performance of stored procedure when migrated from mysql server 5.0 to 5.5

i recently testing the move of our db from one server to another. as part of this process i copied all the data to the new db and started testing it. as a comparison i run a store procedure whose ...
1
vote
1answer
339 views

Will a composite Primary Key use the 15/16 page fill factor or the 1/2?

I understand that if a PK is a consecutive number, it will fill a page as its maximum which is a factor of 15/16. If it is a random PK the page fill factor will be of 1/2. I was wondering if my PK ...
3
votes
2answers
152 views

Selecting large data set on windows and linux

I need to parse a large data set, something like: mysql_query("SELECT * FROM largeTable") while($r = fetch()) { //> Do something } I just need 1 row to be in memory at time, because I need to ...
0
votes
1answer
3k views

How can I select the latest record having one state where no later records exist with any other state?

I want to select the last record (by datetime) having a given state where no later records exist with any other state for each given "widget". widget state timestamp ------ ----- ...
3
votes
3answers
230 views

Database tables design

If I have, in my Java code, the following classes: Patient :contains instance of anther classes (mentioned bellow) PatientBasicInformation: contains PatientId, phoneNumber, Name, Gender, Age. ...
3
votes
1answer
159 views

Database design - many to many

I have one MySQL table which contains: a question 4 possible answers separated by a comma a number (0-3) representing the correct answer. unique id with about 2000 entries. I also have another ...
3
votes
1answer
922 views

User autoincrement ID for username

I want to automatically create user's, which all have a unique ID. Now here's the problem. If two users are created at exactly the same nanosecond, it may not cause problems. Thus, what i do now is: ...
2
votes
2answers
2k views

How to sync two MySQL high load tables with 10M rows?

I have two identical MySQL innodb table with 10M rows each. One is used at backend while other at application end. Thus, either of them loaded. I need to synchronize them in a way which is fast and ...
1
vote
1answer
225 views

Archive table does not work

I have a 19GB archive table that is working as expected on one server. I copied the following 2 files to another server. The table is not working on the new server. r_mi_raw_20120712.ARZ ...
2
votes
3answers
5k views

innodb_buffer_pool_size not changed

I use MySQL 5.5.23-1~dotdeb.0 (Debian) and here is the relevant part of my.cnf default-storage-engine = innodb innodb_buffer_pool_size = 3G innodb_log_file_size = 256M innodb_thread_concurrency = 8 ...
1
vote
1answer
341 views

query_cache tuning for a database server to keep db from slowing

I have a db server that that is a cloud slice of 512mb ram and 20gb disk. I wanted to make this run as fast as i can since it's the db for a magento insall on the app server. I turned on the ...
2
votes
1answer
259 views

Best approach to design a database model for this situation? Clients and records

We need to store the following information for each client: Three types of record per file, for example (obviously, with real data): HDR2007022399999900000000000Soft/XX 0.0 XXX ...
13
votes
3answers
5k views

Why does importing a 12 GB .sql file take more than 36 hours?

I've been waiting now for 36 hours for a 12 GB .sql file to be imported with a simple type site.sql | mysql command. I can see the ibdata1 is growing still, currently nearly 40 GB. Considering the ...
3
votes
1answer
225 views

Get profiles values where message.sender_user_id = profile.user_id

I have this tables: default_messages CREATE TABLE IF NOT EXISTS `default_messages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `subject` varchar(150) COLLATE utf8_unicode_ci NOT NULL, `message` text ...
6
votes
4answers
3k views

Recommended MySQL statistics for production environment

Other than usual system stats (i/o, ram usage, cpu, load, etc) I am currently collecting questions, qps, running queries and buffer pool hit. I find qps pretty useless since our production servers ...
2
votes
1answer
221 views

MySQL: Very slow query, not using index, no joins involved

I am running what I think is a very simple query: SELECT SQL_NO_CACHE m.mbr_nbr FROM tran.member m WHERE m.cardnbr = 000099999930 The table member is a poorly written one, with 133 columns and ...
1
vote
1answer
1k views

MySQL, “columns partitioning” when multiple columns are individiually important

MySQL 5.5 introduces "columns partitioning". http://dev.mysql.com/doc/refman/5.5/en/partitioning-columns.html I'm trying to better understand how it works when two columns are important individually. ...
1
vote
1answer
159 views

mysql: show which users have permissions to a DB

Is there a way to show all users that have permissions on a database? I'm looking for something like: > show_permissions_for_db <DB>; +----------+----------------------+ | User | ...
1
vote
2answers
545 views

MySQL table design / architecture, table is too big

I have a MySQL DB that contains a lot of text, I'm fetching data from a website and inserting it into a table. I'm using a SSD HD (100GB) for the DB and I'm out of space, I think that something in ...
2
votes
2answers
5k views

How does mysql decide if concurrent insert is possible for a MyISAM table?

For "concurrent inserts", MySQL reference manual has the following explanation: The MyISAM storage engine supports concurrent inserts to reduce contention between readers and writers for a given ...
2
votes
1answer
85 views

Where can I find a drawing of the physical structure of a MySQL Server?

I'm new to MySQL but want to learn more about it. I know Oracle and Rdb quite well. Can you show me where I can locate some type of drawing of the physical structure of a MySQL Server?
0
votes
2answers
830 views

Trying to import a large sql file using BigDump. Partial fail occuring

Problem: I am using the php script: BigDump to import a sql file that phpMyAdmin says has 9344926 rows. However when I run it, BigDump calculates and inserts 4050623 rows It should have Total: ...
1
vote
1answer
118 views

mysql dummy where check to utilize multi column index

I have multi-column index on col1,col2. Both columns are unsigned int with values 1 or greater. I want WHERE col2=100. I write WHERE col1>0 AND col2=100. The query should now use my index. Does ...
0
votes
1answer
806 views

How to restore mysql from only myi files?

our server hdds has crashed and we didnt have a current backup so we sent our hdds to a data recovery company, they have been working on hdd's for over a week and they have finally managed to save ...