MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
0answers
38 views

log-slave-updates doesn't write in relay bin with replication-ignore-table option

Here my MySQL circular replication : db1 -----> db2 -------> db3 ignore table db2.t1 db1, 2 and 3 are the same database. db2 ignore t1 table. (replication-ignore-table) Every server has ...
0
votes
0answers
178 views

MYSQL - Multiple set values in one update statement

MYSQL - MULTIPLE SET VALUES IN ONE UPDATE STATEMENT USING 2 TABLES AS REFERENCE AND STORING VALUES IN ONE OF THOSE TABLES WITH A SPECIFIC LOGIC. Hello people, A problem came up by making an UPDATE. ...
0
votes
0answers
62 views

Understanding how MySQL indexes work

I'm reading this page but I can't get past the following parts: When all tables are processed, MySQL outputs the selected columns and backtracks through the table list until a table is found ...
0
votes
0answers
91 views

How does MySQL handle an index if its full size is too large for memory?

Let's assume this (totally artifical) query: select id from T where id%3=0 order by id desc; The index of T (InnoDB) is according to information_schema.tables sized 5 GB and T itself is 3 GB but ...
0
votes
0answers
53 views

joining two tables and counting joined rows

table 1 : categories -------------------------------------------------------------- cat_id | cat_title -------------------------------------------------------------- 1 | sports 2 | news ...
0
votes
0answers
101 views

Save output of MYSQL Schema Inspector

MySQL Workbench 6 has a Schema Inspector that shows all the tables in a DB and useful statistics such as number of rows and average row lengths. How can I get that in a form that I can email someone ...
0
votes
0answers
53 views

Is there a syntax to access the table name in the select query?

In MYSQL. I want to select the records which has the same contents with the table name. for example, consider the following table. <TABLE : tbl_1> +-------+------+ | id | no | ...
0
votes
0answers
56 views

Optimizing group by <date> div <const> queries (MySQL)

I have a query that produces graph data from SQL. The div is to group the numbers into fix dates so it will draw a nice graph (the const is determined beforehand to try and divide the data into ~100 ...
0
votes
0answers
88 views

How much RAM do I need?

Let's assume a query like the following as typical: select A.`date` as `date`, count(*) as N from A as A join B as B on B.id = A.b_id join C as C on C.id = B.c_id join D as D on D.id = ...
0
votes
0answers
73 views

MySQL overtaking system memory and forced to restart

I'm facing a frustrating issue. I have a MySQL Server 5.5 running on top of Ubuntu Server 12.04.3 LTS (VMWare guest w/ 16GB RAM - 8 Cores) mysqltuner.pl says [OK] Maximum possible memory usage: ...
0
votes
0answers
37 views

Create extra databases on a MySQL slave (RDS)

Is there any trouble I can get into with switching off read-only on an MySQL slave (on Amazon RDS), and adding a few extra databases for unrelated use? While we need a read replica for ...
0
votes
0answers
40 views

Is there any way to set server-wide and schema-wide default row formats for InnoDB tables in MySQL?

Is there a way to set server-wide and database-wide default row formats? Currently it seems that I must specify ROW_FORMAT in CREATE TABLE or ALTER TABLE statements. Am I reading the documentation ...
0
votes
0answers
52 views

Backup in Mysql periodically

I have trouble scheduling a backup in mysql periodically, most of the tools do not recognize the geometric field, for example navicat which says Can not get geometry object from data you send to ...
0
votes
0answers
337 views

MySQL 5.6 Installation error on Windows 7

At the last step, when MySQL installer tries to configure, it fails with the following error message: mysql-server-5.6-winx64:50 - Started service. mysql-server-5.6-winx64:56 - Attempting to update ...
0
votes
0answers
32 views

Large-query optimization: given my “explain” results, what stands out?

I've got a monster query, which runs quite quick in many cases, but in some cases very much slower. The EXPLAIN output below is from one of the slow cases. I'm guessing that the slowdown is related ...
0
votes
0answers
57 views

MySQL showing non-linear behavior for a simple insert

I've come across a symptom in MySQL which got me baffled. First, the time it takes to INSERT a certain amount of records changes non-linearily with the amount of records. Second, the time also depends ...
0
votes
0answers
46 views

How to select single value from first column and all the values from remaining columns?

usn sub_code intern1 intern2 intern3 1mv11mca52 10mca11 50 45 44 1mv11mca52 10mca12 40 35 42 1mv11mca52 ...
0
votes
0answers
226 views

Stored procedure to replace a string in an entire database

I am trying to create a procedure to change a string in an entire database... after a lot of searching I have come up with this procedure, but it gives an error. The procedure is: BEGIN declare t, c ...
0
votes
0answers
129 views

mysqldump & upload to mysql speed impact due to SSD and innoDb?

I am testing an AWS Medium Instance with CentOS (AWS AMI) and comparing it with Hetzner's EX40-SSD (http://www.hetzner.de/hosting/produkte_rootserver/ex40ssd). Software setup on both is comparable( ...
0
votes
0answers
72 views

Populate the columns of one table with the records of another

I have one table, FRUIT, describing some measurements that I make: ID Tag Amount Units 1 A 75 Apples 2 B 23 Bananas I would like another table, HISTORY, that tracks the ...
0
votes
0answers
27 views

Unable to determine the replication service template?

As per " http://scale-out-blog.blogspot.in/2012/02/solving-replication-lag-with-tungsten.html I am trying to implement pref-etch in tungsten replication when i am executing below command i am ...
0
votes
0answers
140 views

In mySQL possible to change auto-increment ids that have huge gaps and if so how?

I am importing a 50 table relational database (I'm not a dba) with 250,000+ records in most of the tables, yet the auto increment is off in most tables, some for example showing the last ID at 5 ...
0
votes
0answers
80 views

can this mysql query be optimized further?

I have this query select counterparty_id, max(id) max_id from client_administrations where counterparty_type = 1 and effective_on <= '2013-10-22' group by counterparty_id When I ...
0
votes
0answers
41 views

AWS - Only Use IOPS as Needed?

We are running an EC2 Instance with MySQL and and IOPS Volume. (We will eventually be upgrading to RDS but this is what we have for now) We have peak times where the IOPS really helps, but the rest ...
0
votes
0answers
72 views

What is the postgresql equivalent of mysql grant require x509?

We're migrating from MySQL to PostgreSQL. We have to support SSL. MySQL supports creating users which require SSL certificate validity using "GRANT ... REQUIRE X509" [1]. Does PostgreSQL have ...
0
votes
0answers
94 views

MySQL Slave with erratic Read_Master_Log_Pos during binlog rotation?

I have two mysql servers setup with default my.cnf config apart from server-id's and enabling binlogs on masters. Replication is setup and working and i have a simple bash scrip on master feeding in ...
0
votes
0answers
99 views

Better way to query for object with multi level parts

For example, an object consists of several parts, and each part consists of several sub-parts, and so on. In MySQL, it looks like this: table `object` ----------------------- object_id, object_name ...
0
votes
0answers
39 views

taking backup of database on remote server gives error

I am currently on a Ubuntu machine (IP is 192.168.1.3) I have databases here I want to export all these databases to another machine in my network I used following command mysqldump --all-databases ...
0
votes
0answers
17 views

Services in a Catalog with Year/Week/Day period

I want to create a database structure for the Services in a Catalog with Offres for one or more services. Each Offre is available for one Year period ( example : 01 Janvier – 31 Mai ) , for a Week ...
0
votes
0answers
260 views

Using an enum as part of an index definition

When I use an ENUM column in a table the ORDER BY uses the ordinal of the ENUM not its value. I wasn't aware of that. So my question is what are the subtle issues when an ENUM is part of an index ...
0
votes
0answers
92 views

Seeding Pivot table with percentage

Given two tables - users and games - and a pivot table - userGames, I'm trying to efficiently seed the userGames table For testing, so that each user has close to a set percentage of games. The query ...
0
votes
0answers
425 views

MySql INNER JOIN doesn't use composite index

I have two tables, table A which contains date and name of table B entry and table B which contains its name and type. Table a has a composite index on table_b_name and date. I'm selecting all table A ...
0
votes
0answers
194 views

Improve Speed of MySQL Database Import

I'm importing around 44 GB (14 million rows) of information into an InnoDB MySQL database, and I'd like to do so in a reasonable timeframe. Since I'm doing this on a personal computer, I only have 8 ...
0
votes
0answers
131 views

Slow query with ORDER BY with index created (more than 4mins on 0.6million records

I ran into a very weird query performance situation. If I run this query without order by, it finish in millsecs, with order by, it ends up with more than 4mins. EXPLAIN SELECT `book_book`.`id`, ...
0
votes
0answers
67 views

MySQL server vs client isolation levels

What is the difference between setting the transaction isolation level in the client configuration and the server configuration? If I set the client isolation level to be serializable while the ...
0
votes
0answers
74 views

MySQL: Optimizing for large but discrete data sets

In brief: I'm developing a database that handles GTFS datasets from multiple transit agencies. Each dataset contains millions of rows in the stop_times.txt file (and thus its corresponding table). ...
0
votes
0answers
440 views

Is it possible to optimize a range query so an explain statement would state “using index” instead of “using index condition”?

I have a very large table where specific queries made by my application are timing out. The table looks something like this: LargeTable ------------ Id [BIGINT(20)] UtcTimestamp [BIGINT(20)] Pivot ...
0
votes
0answers
200 views

MySQL stops responding (at almost regular intervals)

Using mysqld (latest xampp version). My.ini port= 3306 socket = "D:/xampp/mysql/mysql.sock" basedir = "D:/xampp/mysql" tmpdir = "D:/xampp/tmp" datadir = "D:/xampp/mysql/data" pid_file = "mysql.pid" ...
0
votes
0answers
74 views

Lock timeouts on a table with two keys, where only one connection writes for a given value of the first key at a time

I have a table user_rollup_message_list that is keyed by (user_id, message_reference). It is a write-heavy table, and gets enough writes that I get many lock timeouts, with a timeout of 50 seconds, ...
0
votes
0answers
75 views

unexpected null returned from calculated columns

I'm working on a program that will calculate journey times based on bluetooth MAC addresses and i'm trying to nail down the mySQL commands I need before I get cracking on the software part of it. i ...
0
votes
0answers
230 views

Mysql high delay in critical peak | Professional Help request

I have a Centos 6.4 under 2.6.32-358.18.1.el6.x86_64, running Asterisk 11& A2billing in real-time switching with Mysql 5.5.33. My Server it's a Dell R420 having dual Intel(R) Xeon(R) CPU E5-2470 ...
0
votes
0answers
79 views

Need advice on this EER Diagram

This db will work with a CakePhp app and need advice about design. Is it good idea to put orders on center or should I put clients on center? Clients has orders and an order record can only have one ...
0
votes
0answers
236 views

How to increase MySQL performance with joins

I have a MySQL database with InnoDB engine. Particularly one of my queries became very slow. The query is shown below: SELECT t1.`ARTREF1` FROM `lijnen` AS t3 INNER JOIN (`kortingen` AS t2, ...
0
votes
0answers
40 views

How to optimize this query more?

First at all I am nood into SQL thing, Now I am working on a class project where I have some tables like Table user user_id | username | name 1 | nihan | Nihan Dip 2 | dip ...
0
votes
0answers
98 views

Query Execution Plan for MySQL

In Microsoft SQL Server you can see Execution Plans for queries to see how a query is executed, what joins take the most time and see any missing indexs now i want to do the same for MySQL scripts ...
0
votes
0answers
63 views

designing mysql for large tables

Currently I've been assigned the task to research ways to speed up an existing project. It's going to be rebuild so we can start from scratch, the current implementation has been build by another ...
0
votes
0answers
70 views

MySQL randomly refuses to use index

Mysql randomly refuses to use indexes for even simple queries. 1 example from slow-query log: # Time: 130904 12:19:59 # User@Host: cron[cron] @ [10.71.41.38] # Query_time: 58.488760 ...
0
votes
0answers
180 views

Drupal database doesn't work after MySQL restart

I've installed Drupal 7x on my local XAMPP 1.8.3 Server. Everything went fine but after adding some modules, changing the drupal theme and restarting the MySQL Server, the MySQL Server is dropping ...
0
votes
0answers
661 views

How to configure MySQL master & slave to backup master to slave?

I have a complete backup of one database from master to slave. Now I want to back up two databases from master to slave. But use the same ways it doesn't work. What should I do? Master's conf ...
0
votes
0answers
29 views

Reliability of blobs in MySQL

I'm in the process of migrating an application working with Oracle to MySQL. That application stores data in the form of blobs, which can be pretty big. The Oracle production database is 60 Gb large ...