MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

1
vote
1answer
12 views

Will MyISAM prevent multiple users inserting data at the same time?

I am using a MyISAM database to store user data because I am using full text searching. I have looked in to options like Sphinx but cannot install this on my shared hosting plan which uses MySQL ...
1
vote
1answer
44 views

InnoDB inserts 100 times slower than SQL Server inserts

I have a simple table with two columns: id (autonumber) and name (char(255). When I use C# to insert 100 records in a loop it takes about 30 milliseconds per insert. This is way too slow. So I ...
0
votes
1answer
22 views

Stored Procedure count and list the occurrence using like from another table

Actually this is my first procedure apart from basic "Hello world" procedure. I have two tables like this: cars users ------------------------- ...
0
votes
0answers
17 views

Why index is not used?

I've been asked a question in interview which i could not able to answer as i'm not much into mysql. I would like to know explanation about scenario. There is a table with colomns like id, day & ...
1
vote
1answer
15 views

check the progress of table upload-mysql

I have a dataset of around 200GB. The sample is shown below: Posted a new song: "Ensaio Don`t back anger & imagine- Stone Rocks " http://t.co/i9TqakT38t #music 460523675293196289 ...
0
votes
0answers
9 views

MYSQL Group Replication

I have setup a Master-Master-Slave replication where say A B and C, I want to replicate data from A to B (which is working) and B to C (also working) and from A to C which is not working with two ...
2
votes
0answers
27 views

select on table slows done during update on same table

I have a weird problem with mysql. During a transaction which runs from 10-30s around 270 statements are performed, some of which are updating and inserting a few rows on a table. If a select is ...
0
votes
1answer
10 views

my.ini configuration for a huge server

I have developed a web based app in PHP MySQL and Flash Builder. It was running fine until a few days ago when the client began to connect a lot of users. Then the app started to freeze and sent ...
0
votes
0answers
13 views

Data load architecture advice? [on hold]

imagine you have several isolated mysql database servers each responsible for capturing their local data, and you want to upload diffs of data (could be any DML) to a central server which holds ...
3
votes
1answer
318 views

One foreign key for two columns

I have two tables, Results and Teams Teams has the following columns: team_id team_name Results has the following columns: match_id home_team (foreign key references teams [team_id]) away_team ...
-6
votes
0answers
42 views

i want to create one generic query for all database like Oracle,Mysql,Mssql [on hold]

I have to create different query for different database like Oracle,Mysql,Mssql .but i want to create only one generic query which runs or should works on all different database like ...
2
votes
1answer
28 views

MySQL: Sum if rows are equal

I have a table with 4 columns: Client , thickness , material and amount. I want to make a SQL select-query to select everything, but when the client, thickness and material are the same their value ...
1
vote
1answer
29 views

How can I speed up an sql query that round trips between two tables

I first posted this question on stackoverflow, and now I see this site, seems more relevant. These tables are not that big, but the time taken to process this query is long. What can I do with the ...
0
votes
0answers
23 views

MySQL Multi Count and Filter

Table: Event ============== ID OldUserID NewUserID Date Table: User ============== ID Forename Lastname .... How can i filter by date column like so... this code is pseudo... SELECT ...
1
vote
2answers
17 views

is it possible to get innobackupex to print the filenames it's busy with?

I am getting crashes when trying to run innobackupex --apply-log. How can I find out what files it's processing at the time? I don't see a relevant option mentioned in the documentation.
0
votes
1answer
16 views

Creating Triggers to insert into a table where the table is altered by other application

I have a database in my local machine which is actually updated by an online application. I want to create triggers for a particular table ( say table1) such that it inserts values (From Table1) ...
0
votes
1answer
17 views

insert multiple authors only if it exists in MySQL

I have a problem . I am doing a PHP -My SQL project . I got to store author/s of a conference paper in a database . But sometimes its just 1 and sometimes it can be 2 or 3 or 10 . So how do i store ...
0
votes
0answers
6 views

Question on turning on GTID for MySQL master and slaves

I came across the interesting article by Facebook's Engineering team where they were able to deploy GTID in MySQL at a large scale : ...
0
votes
1answer
10 views

Query Performance Regression Between Different Versions

I have two MySQL databases, A and B. They have identical hardware and schema. They have different data and database A has more data then B. Database A is also running version 5.1, while B is on 5.5. ...
-1
votes
1answer
41 views

MySQL Multi Count

How can i get this result? ╔═════════╦═══════╦═══════╗ ║ EventID ║ User1 ║ User2 ║ ╠═════════╬═══════╬═══════╣ ║ 1 ║ 1 ║ 2 ║ ║ 2 ║ 2 ║ 3 ║ ║ 3 ║ 3 ║ 1 ║ ...
0
votes
1answer
13 views

MySQL - Backup new and modified entries only

I am developing a very huge system in Java using Hibernate and MySQL. Now, I want to automate the daily, weekly, and/or monthly replication (backing up) of the data that are stored from the database ...
0
votes
0answers
6 views

Simple way to migrate application SQL database into an archive database?

I'm not super technically oriented. I've used SQL for many years, but primarily operating within databases and not so much managing them in total. Anyway, we have an application we're getting rid of, ...
0
votes
0answers
16 views

MySQL what is the order of the table lock for this query?

An example query looks like this: INSERT INTO Adventure (sword, fighter, quest) SELECT Swords.id, Fighters.id, Quests.id FROM swords Swords, fighters Fighters, quests Quests WHERE Swords._id = ...
1
vote
1answer
7 views

Mysql update adding subquery field value to field

I want to update a field adding it the value of a subquery field. I'm trying this: UPDATE table a SET a.field=(a.field+b.subfield) INNER JOIN (SELECT subid, subfield FROM subtable WHERE ..... ) AS ...
0
votes
1answer
20 views

optimize my query mysql

I have the following query: SELECT DISTINCT d.movieName, d.castName, d.movieImdbId, f.year, f.posterLink FROM director_movie as d LEFT JOIN film_info as f ON d.movieImdbId = f.ImdbId WHERE d.castName ...
0
votes
1answer
31 views

How to move data from SQL Server to MySQL database

Our MSSQL database has a table that has about 4 million rows of data. My original plan was to copy it over to a MySQL database and place it in a more optimized format. For some reason, the people ...
-1
votes
0answers
20 views

mysql server bigint [on hold]

I am running an error from MySQL server, where it indicate that bigint is not support by MySQL server 2008, what is the problem from my data migration when I want to execute the database?
0
votes
0answers
14 views

MySQL crashing after a couple of days: Link to database cannot be established: SQLSTATE[HY000] [2002]

MySQL is crashing on my server every couple of days (could be a bit more than one week or 4 days). The install is on a VPS that is not really used. Here is the error message I have: Link to ...
0
votes
2answers
58 views

Find the last visit by teacher and show the rest of columns in MySql

I would like to group the teachers by the last visit and show the other values corresponding to the last visit. CREATE TABLE IF NOT EXISTS `visits` ( `FIELD1` int(5) NOT NULL, `teacher` varchar(9) ...
1
vote
1answer
20 views

at least one member of a list within another list when querying over a join

assume the current layout in a Mysql datbase Activity (id,etc) [id is primary key] AcitivityMapper (activityID, targetYearID) [composite key] Years (targetYearID, targetYearName) [id primary key, ...
0
votes
1answer
12 views

Multi-master synching in three geographically separate datacentres

Our company needs to create an application that operates in all parts of the world. We are looking to have three servers (one in Europe, one in Asia and one in America). I'm looking to use ...
0
votes
1answer
23 views

Simple left outer join leaving me with inner join

So I have a table with each record being a change to an object. e.g. in the app you open your project with a project id in this project you edit an object name hit save that generates new record ...
0
votes
0answers
13 views

multi aggregated sql query functions

I have the following query: SELECT u.username, t.pack_id, COUNT( t.id ) transaction_count FROM `transaction` t INNER JOIN `user` u ON t.customer_id = u.id GROUP BY ( t.customer_id ) HAVING ...
0
votes
2answers
46 views

Performance Benchmark - MySQL vs PostgreSQL [on hold]

this is my first question here in DBA. I wish to do a performance comparison between MySQL and PostgreSQL using same database on the basis of total time taken to parse + execute + send result back ...
0
votes
1answer
23 views

MySQL insert position value

I have trouble while inserting the values corresponding to a column: position. I have multiple inserts like this: INSERT INTO category_product(id_category,id_product,position) VALUES(2,1,1); INSERT ...
0
votes
1answer
19 views

Can I use xtrabackup to import a database without altering others?

Context: Each time a demo branch is built, I want to download a copy of the prod database and setup it onto the demo server. This way under the MySQL I have X database corresponding to X demos. I ...
1
vote
0answers
15 views

Multilanguage category structure - standard vs. normalization?

I'm building a multilingual application and I need some advice on how to structure the table. Basically I have a category table based on nested set. There are 4 languages and I plan to enlarge this ...
0
votes
3answers
49 views

Duplicate values

Here is my table : PlayerId NoOfTeams 1 3 2 2 3 2 4 NULL 5 NULL I want to display PlayerID having same No.OfTeams including NULL values. Could any one please ...
0
votes
0answers
19 views

Signal in MYSQL procedure with parameters?

Following is from my MySQL dump DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `test`() SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Mobile Number Exists'$$ CREATE ...
1
vote
0answers
26 views

Strange MySQL replication error 1146 (Table doesn't exist)

I'm getting a very weird MySQL replication error No. 1146 for a REPLACE INTO query on a slave host replicating all tables in all databases from a master, and I'm having a bit of a hard time ...
0
votes
0answers
12 views

New To SQL and looking for some advice [on hold]

I have just finished my first SQL server class and would like to continue learning how to develop databases. The problem that I am having is that I am a noob at this, and I cannot think of a simple ...
0
votes
0answers
9 views

In MySQL 5.6, schema changes in master blocks the slave?

I have a question with a MySQL 5.6 master-slave setup. If you were to modify the master's schema with an ALTER TABLE SQL query, when the slave tries to execute that ALTER TABLE statement too, would it ...
2
votes
2answers
54 views

Is it ok to have 40+ columns in a table

I am currently re-designing some of DB's for a project. There is one DB in particular that is giving me a little of a headache. The idea is that for every client_id and date (client_id + date would be ...
0
votes
1answer
71 views

Increase performance WITHOUT adding indexes [on hold]

I'm having a rather large table (350MB, 1.3M rows) and there are dozens of queries arriving at this table every second. Most queries are super-fast thanks to indexes - but some others aren't. ...
1
vote
0answers
14 views

Sysbench insert data between a given range

I was trying to insert 1000000 records of data into 1000 tables in sysbench. But after installing about 278, sybench just crashed with the following error: FATAL: failed to execute function ...
0
votes
0answers
12 views

Are ZRM (Zmanda Recovery Manager) incremental backups reliable?

I had an issue while restoring incremental backups and I'm wondering if they are reliable. I'm making weekly full backups and daily incremental backups and I needed to restore a single database after ...
2
votes
1answer
32 views

What is the Best way to set Disaster recovery setup for percona Xtra DB Cluster?

We do have a Percona XtraDB Cluster(Master-Master-Master) setup in one country. Now we want to setup a disaster recovery setup in some other country. Please provide us the best possible ways to do ...
0
votes
0answers
34 views

Select these if this, or select these…

Here is my problem: organization_category.id can be either 1,2. With organization_category.id = 1, then the organization_type.id can be 0,1,2, or 3. With organization_category.id = 2, then the ...
0
votes
1answer
15 views

Select all results from two independent tables

I have two tables: Comments -------- id comment_content time_stamp Activities ----------- id activity_content time_stamp And I would like to combine the results from both, ordered by their ...
1
vote
1answer
16 views

How to Paginate a MySql Ranking Query

I have the following ranking query working fine with a limit of 25 records per page, it shows 1st - 25th for the first 25 records, but when i go to the next page, the rank stays the same 1st - 25th ...