MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
0answers
74 views

Mysql: Large Query with subqueries optimization

Any query optimization gurus in the house?? Anyway, I am trying to attack this on two fronts, one being to code a way around it but secondly, I'm thinking some real optimization might help in the ...
1
vote
0answers
72 views

MySQL: Assessing performance of a query by using EXPLAIN

It is said that the number of rows are scanned is smaller the performance is higher when use Explain to optimize query. So I wonder When the EXPLAIN output includes many rows, is there any formula ...
1
vote
0answers
101 views

MS SQL to MySQL Conversion

Is there a tool available that converts queries written as triggers, stored procedures and functions written in MS SQL 2008 to MySql? We switched databases and now I need to rewrite a bunch of queries ...
1
vote
0answers
367 views

MySQL: Writing log entries from stored procedure

Is there a standard way to write log messages in MySQL stored procedures? I can write log messages to a designated log table, but I prefer the standard log mechanism where each message is coupled ...
1
vote
0answers
109 views

What would make a MySQL database create tables in a different collation other than its default?

I am adding tables to a Wordpress database on my localhost and it is changing my collation from utf8_general_ci to latin1_swedish_ci. I'm kinda stumped because I'm not familiar with working directly ...
1
vote
0answers
52 views

Partition guides and possible solutions?

We have a table called tblLink which is the main table and have its primary key in many other tables as shown below. The issue now we want to keep only the latest 3 months data and the rest should be ...
1
vote
0answers
90 views

MySQL: Fixing Unique key constraint violation

I have a database with an unique key constraint. When I import this database from a dump created by mysqldump I get '14698-3' for key 'UNQ_CATALOGS EARCH_FULLTEXT_PRODUCT_ID_STORE_ID' But when I ...
1
vote
0answers
503 views

multiple child records in a single row by join

I have one master table (teacher) structured like teacherId Name Class 1 Praveen 10 2 John 9 and having a child table (student) structured like studentId ...
1
vote
0answers
91 views

migrations within transactions

I have a bash script to run migrations on our MySQL databases. Is it possible to wrap migrations within a single transaction when running multiple migration scripts from the command line? ...
1
vote
0answers
130 views

phpMyAdmin slow for small database

I have a small database (<100 KB when dumped) that will hang in phpMyAdmin when I try to sort by various columns. Sometimes it hangs when I try to edit columns by directly clicking on their ...
1
vote
0answers
111 views

How can I force myisamchk to modify the original data file in case of duplicate keys?

In the documentation for myisamchk, it says: --quick, -q Achieve a faster repair by modifying only the index file, not the data file. You can specify this option twice to force myisamchk to ...
1
vote
0answers
75 views

How to profile individual queries using PERFORMANCE_SCHEMA

I've been looking at SHOW PROFILES, which seems ideal for what I am doing. However, I've noticed a warning that SHOW PROFILES is being deprecated and that PERFORMANCE_SCHEMA should be used instead. ...
1
vote
0answers
59 views

MySQL Partioning: Is there a performance tradeoff between number of partitions and size of each partition?

I have a large table (several 100 million rows) that I would like to efficiently partition. My question is whether there is a tradeoff between partition size and number of partitions. As far as I ...
1
vote
0answers
181 views

Improving database design for category based site

I'm working on a site that gets about 30k visits a day and it makes use of a lot of queries which uses UNION's over about 45 different tables, these tables generally range from about 15k rows to about ...
1
vote
0answers
236 views

MySQL GROUP BY and ORDER BY giving inconsistent results

I'm currently working with WordPress, and I've added a new meta value which is a number between 0 and 30. Zero is ignored and up to 30 need to be organised in order and only the latest (based on the ...
1
vote
0answers
143 views

Get all comment.message, status.message, users.* and profiles.* where users.user_id exists in friend.friend_id or friend.user_id

I need some help building this query because it's a bit complicated at least for me. I need to get all comment.message, status.message, users.* and profiles.* where users.user_id exists in ...
1
vote
0answers
2k views

mysql taking too long to send data

I have a simple table with million of records (14,000,000) and for a simple query it is spending too much time "sending data". The table CREATE TABLE IF NOT EXISTS details ( id int(11) NOT NULL, ...
1
vote
0answers
799 views

SQL query optimization in Prestashop e-Commerce solution

I'm working on a layered navigation module within Prestashop e-Commerce solution. I'm trying to optimize a SQL query which creates a temp table during execution. I think this is creating a ...
1
vote
0answers
105 views

Why do we need myisam spatial extension anyway?

If just to determine whether a point is within a rectangle, What is wrong with this query? EXPLAIN SELECT DISTINCT TB.ID, TB.Latitude, TB.Longitude FROM TableBusiness AS TB WHERE ...
1
vote
0answers
188 views

mysql server is not sending result set back after query execution to client and staying in sending data state

When I pass a query from my Java application to mysql server, it stays in Sending Data state and not returning result set back to application. When I execute the same query in SQLYog directly, it ...
1
vote
0answers
739 views

Tables don't exist after MySQL restart

I recently made changes to optimize performance for InnoDB engine-based DB and soon after when restarting I encounter into the following strange behavior: I have some tables with data in them I made ...
1
vote
0answers
149 views

Enforce a hard limit on write execution time during Amazon RDS write stalls

I am trying to recover from the situation where Amazon RDS write operations stall (some discussion on why this is here). If I show full processlist, I will see something like this: 318263 myapp1 ...
1
vote
0answers
773 views

stored procedure returns ERROR 1305 (42000): FUNCTION does not exist

I have a stored procedure and function as below CREATE PROCEDURE ProcName() begin .... DECLARE curs CURSOR FOR select A.PList, B.nid from persons A inner join articles B on A.aid=B.id; .... ...
1
vote
0answers
779 views

Why can I not start mysql server on ubuntu after change the innodb_flush_log_at_trx_commit value to be 2?

Why can I not start mysql server on ubuntu after change the innodb_flush_log_at_trx_commit value to be 2 ? updated to answer the 3 questions: mysql> show variables like 'version%'; ...
1
vote
0answers
315 views

Oracle Flashback Archive aka Total Recall in MySQL

What would you suggest as a replacement system to achieve the same functionality of Oracle Flashback Archive aka Total Recall in other DBMS, in general or specifically in MySQL or MariaDB? ...
0
votes
0answers
4 views

MySQL Workbench EER Diagram and ENUM data type

I am creating EER model diagram using MySQL Workbench (version : 5.2.47) The version for MySQL, I am using is 5.5.35-0ubuntu0.13.10.2. I have created a schema with 'Default Collation' set to 'utf8 - ...
0
votes
0answers
12 views

MySql query keep running for a long time

Following query keep running for a long time and I'm using MySql 5.5.34 on XAMPP on Windows SELECT id_package, `pck`.`fk_sales_order`, `pck`.`fk_picklist`, count(pci.id_package_item) as items, ...
0
votes
0answers
5 views

How is the key length determine is an index?

Aside from explicitly setting the key length when creating an index, how does MySQL determine the appropriate key len shown when running "explain"? Thanks
0
votes
0answers
9 views

Is there any value in adding a pk column to an composite index?

I recently inherited a database with indexes that contain the table's primary key as part of some composite indexes. Given MySQL adds a hidden column representing the PK regardless of whether you ...
0
votes
0answers
18 views

MySQL best practice DB recovery

I am trying to figure out what is the best practice is for Mysql recovery after a power failure. I need to find a way that if a server (which is running on a virtualbox VM) goes down when it goes ...
0
votes
0answers
14 views

using the wordpress approach for storing taxonomies

multiple tables vs single table a user table will not need every social link in the database column, since every one will not enter all their social links and are used only on user profile ...
0
votes
0answers
32 views

Mysql Insert taking too long. Table need optimzation

I have around 60 tables and a video table with over 600,000 rows. with 4 Btree and 2 FULLText Indexes and have around 30 Columns. Server Specs are high, over 30G of Ram, Intel Xeon Processor. Mysql ...
0
votes
0answers
11 views

PHPMy Admin Exporting Importing with Foreign Key Constraints

I have a major issue here, How do I export a MySQL Database from PHPMyAdmin whilst retaining all the table relationships(foreign key constraints) - I have noticed performing a quick export does not ...
0
votes
0answers
15 views

How do you hide tool tips in MySQL Workbench?

Is there a way to hide the tool tips that popup when you hover over objects? Especially when you hover over tables, I do not want to see the breakdown of what objects are in that table.
0
votes
0answers
34 views

Mysql 5.5 InnoDB growing CPU - Going crazy

Good morning, I'm currently facing a problem where CPU usage keeps going up until the server crash. I've tried multiple best practices proposed in this forum and on Percona, reinstalled the server ...
0
votes
0answers
19 views

MySQL - Out of memory: Kill process 3046 (mysqld)

We run a MySQL (v5.6.17) dump backup every 4 hours, and today noticed: Apr 19 20:09:30 mysql1 kernel: Out of memory: Kill process 3046 (mysqld) score 970 or sacrifice child Apr 19 20:09:30 mysql1 ...
0
votes
0answers
13 views

No privileges on the admin

I am using MySQL on AWS, and I came to horrific realization that privileges were flushed shut N across the board today. I was able to view this from an other user has very few privileges, but one of ...
0
votes
0answers
18 views

Issues with Inserting due to FK constraints

I have two tables: Employee, and Department. They are setup like so, : CREATE TABLE IF NOT EXISTS `mydb`.`Department` ( `Dname` VARCHAR(25) NULL, `Dno` INT NULL, `Total_sal` INT NULL, ...
0
votes
0answers
46 views

Avoid transaction rollback when Deadlock is encountered (mysql)

I'm currently trying to handle concurrent inserts correctly using MySQL, I'm basically doing the following: CREATE TABLE foo (id INT NOT NULL PRIMARY KEY) ENGINE=INNODB; CREATE TABLE bar (id INT NOT ...
0
votes
0answers
23 views

MySQL CPU high usage

My MySQL service started to using a lot of CPU recently. Few second after restart it takes 100% CPU's. I tried already changing my.cnf file to optimize cache/buffers. I have no idea what causing that ...
0
votes
0answers
13 views

MySQL - How to grant read access to all tables, write access to a few, to one user for multiple databases?

Ubuntu Server 11.04 - a testing server with at least 10 copies of the production code. Each copy has its own database. And there are two sets of database prefixes in operation. There is an add-on ...
0
votes
0answers
22 views

Can't Add Databases through PHPMyAdmin

EDIT (should've mentioned this sooner): I'm using a Mac, running OS X 10.9.2 Being fairly new to PHPMyAdmin, I thought I was removing settings/privileges for one single user through PHPMyAdmin, but ...
0
votes
0answers
15 views

MariaDB Galera setup with drastically different amounts of memory used on cluster nodes - why?

We have a 3 node MariaDB Galera cluster. All nodes are identical and the config on each is identical. They have 64GB of RAM each. The output of the following query is 28: SELECT ...
0
votes
0answers
27 views

MySQL Query for combobox

I have two tables in my database.namely books and bookidofid. where bookidofid from books table is referenced to bookidofid from bookidofid table Table books ...
0
votes
0answers
25 views

How to use Select query just right after Insert on master in a query.?

I have a question on mysql replication. As usual, I deployed my db structure like the Update on master db, the select on slave. My questions. If I use SELECT query just right after INSERT in a query, ...
0
votes
0answers
21 views

Why does MySQL randomly display my databases?

Using InnoDb for the tables, Zend installation that comes with MySQL on Windows. Basically what happens is that at each system startup (not MySQL) I get a random snapshot of my databases at some ...
0
votes
0answers
23 views

Concatenate extrapolated data from two tables

I want to concatenate two tables that contain user data. The purpose is to display the duplicate user accounts based on email, IP address and connection logs. The two tables containing user data (I ...
0
votes
0answers
30 views

MySQL wont start after abnormal shutdown

I had an abnormal shutdown of the server, when I started it again I get this errors. If I remove ibdata1, ib_logfile0, ib_logfile1 its starts, but the databases aren't there...I can't restore a ...
0
votes
0answers
24 views

Auto Increment Column for Ordering

I have the following table and I just added the ord column because I need to ORDER BY ord all of my tasks selected for a user/group. I want them to always be returned in the order the user added the ...
0
votes
0answers
19 views

#2002 Cannot log in to the MySQL server / Connection for controluser as defined in your configuration failed

I use PHP/MySQL in Ubuntu 13. To reduce the size of ibdata1, i followed this post What is the best way to reduce the size of ibdata in mysql? and make necessary changes as told in the answer. I did ...