MySQL : Open-Source, Relational Database Management System

learn more… | top users | synonyms

0
votes
1answer
18 views

How to optimized mysql query having large dataset

I have two tables in MySql with the following schema, CREATE TABLE `open_log` ( `delivery_id` varchar(30) DEFAULT NULL, `email_id` varchar(50) DEFAULT NULL, `email_activity` varchar(30) DEFAULT ...
0
votes
1answer
39 views

How to simulate a table join on itself?

Let's assume this is my current data: product_number date value 100 2010-01-01 1 100 2010-02-01 1 100 2010-03-01 1 200 2010-01-01 1 ...
1
vote
1answer
12 views

Select the last logged change before a specified time from a change list

I want to get the last change for all issues issue, that was made before a specified end time. I have 3 tables. projects +---+------------+ |ID |project_key | +---+------------+ |1 |bug_tracker | ...
1
vote
1answer
28 views

MySQL Cluster ndb_desc and parttions

I have mysql cluster with two datanodes and noofreplicas=2. According to documentation there must be 1 nodegroup, 2 partitions and 4 parts at all (2 primary and 2 backup). I have a table with 1000000 ...
-3
votes
0answers
23 views

Delete & Truncatehttp://dba.stackexchange.com/questions/30325/delete-vs-truncate [duplicate]

what is the major difference DELETE vs TRUNCATE delete and truncate the data base ???
0
votes
2answers
32 views

Query Cache Implementation Details

I am new to DBA stack exchange & this is my first question. Kindly help me in finding a low level documentation for Query Cache module in MySQL since I am planning to work with the source code of ...
1
vote
2answers
69 views

Restoring MySQL Tables from .ibd, .frm and mysqllogbin files

For some reason, when I try to open up my tables that are stored in .frm and .ibd files (whether on MySQL or phpmyadmin) it gives me a syntax error or it says it does not exist. I've read the other ...
0
votes
1answer
39 views

Could not access database

I have been trying to setup a local instance for a new application. I am new to MYSQL and I cannot understand how to actually connect this database to the actual web application sitting in the ...
2
votes
2answers
67 views

I need help optimizing a not that complicated query that returns unexpedcted performance problems

I have a table that stores details about incoming and outgoing phone calls such as when a call was made, or when a call was received, the phone number of the caller, and the phone number of the ...
2
votes
1answer
6 views

MySQL Stored Procedure Requiring SUPER

I'm trying to figure out a "safe" way of allowing a non-SUPER user to execute a specific command requiring SUPER privileges, i.e. SET SESSION binlog_format = 'MIXED'. I don't want to grant the user ...
0
votes
0answers
12 views

MySQL Is there a performance difference between col = val and col IN (val)?

Is there a significant performance difference, or any other reason why I shouldn't write, for example: SELECT * FROM table WHERE col IN (val); Instead of: SELECT * FROM table WHERE col = val; I ...
0
votes
1answer
15 views

MySQL Syntax - Searching points within polygons using GeomFromText

I am trying to select points within polygons using the GIS/spatial extensions for MySQL. I'm fairly new to this, so bear with me if this is an elementary question. I have points defined as text ...
1
vote
1answer
12 views

my phpMyAdmin data is hashed or hexed?

I have a mySQL db setup in MAMP in which I connected mySQL Workbench to administer the design of the database. When I inserted some data today from within myPhpAdmin (localhost:8888), I noticed the ...
0
votes
0answers
17 views

How to manage “up to date” data and data “in use” [on hold]

On my CMS, we can update/modify data. I want to implement a "deploy" function ,which can be used by only moderators, to save this data and enable access to it through my webservice. Only data deployed ...
0
votes
0answers
20 views

Mysql 5.5+ replication heartbeat feature

I am writing scripts to monitor replication, and while analyzing effect of MASTER_HEARTBEAT_PERIOD keeping in mind about 3 TCP parameters viz : tcp_keepalive_time, tcp_keepalive_intvl, ...
0
votes
0answers
21 views

Function performance issue

This one is puzzling me since yesterday and maybe someone could shed some light on this. We've got this table that records GPS data. We're currently doing some overloading tests to see how the ...
3
votes
1answer
56 views

Percona MySQL 5.5 Unique key is duplicated

I'm totally out from ideas, so maybe somebody else could answer my question. We have a MySQL 5.5 server from Percona with high traffic. The application is in PHP and writes always to master. We have ...
0
votes
0answers
16 views

How to join two tables and fetch in android apps using js

I am doing a project on Android apps using Eclipse Juno. I am using MySQL as the database connection. The app is about getting an appointment with a doctor of some particular department (let's say ...
2
votes
1answer
34 views

Efficiently searching geolocations - LAT/LNG and DECIMALs

I have a database with > 7.5 million rows (and growing), each with an image record that has a specific LAT/LNG geolocation representing where the photo was taken, stored as DECIMAL values - ...
0
votes
0answers
36 views

Select and sum from related columns

I have table with the following columns: date (month), hours/days (31) and daily tasks (31) Columns: date day1 day2 day3....task1 task2 task3.... Records: june 4 6 2 .... run walk ...
0
votes
4answers
31 views

Converting to MyISAM, `foreign_key_checks = 0` Not Working

At the end of a long series of compromises working in a system I didn't design, own, or maintain, I need to convert a number of MySQL InnoDB tables to MyISAM tables. However, when I attempt to alter ...
1
vote
2answers
19 views

getting one day timestamp in mysql

Please consider the following stored procedure I have: ORIGINAL Stored Procedure: -- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments ...
1
vote
1answer
47 views

How to make the SQL query more efficient?

I use mysql under Linux. My table is about 8000000 rows. The table has index(advertiser_id,activity_date),(activity_date,advertiser_id,activity_type). The table is looks as following: activity_date ...
0
votes
1answer
17 views

MySQL Update Multiple Rows in Large Table

I have a large InnoDB MySQL database table. I would like to run this query against the database table: Update myBigTable Set someColumn=x WHERE userId = 7 OR userId = 88 OR userId = 22 OR userId = ...
1
vote
2answers
36 views

MySQL describe | more

With my current setup, it's going to be very hard, if not impossible, to get my terminal window to scroll up and down. That means I can only see 25 rows of text at once. If I have to display something ...
0
votes
0answers
19 views

MySQLDump and Amazon RDS

I need to dump the contents of an RDS database into a SQL file, and restore that file to another RDS or MySQL instance. On the RDS instance there are a number of databases and users, and I would like ...
0
votes
1answer
36 views

Problem with foreign keys

I do ALTER TABLE bdt.auth ADD CONSTRAINT `depositor no.` FOREIGN KEY ( `depositor no.` ) REFERENCES bdt.depositors( `depositor no.` ) ON DELETE CASCADE ...
0
votes
1answer
17 views

Creation of a simple field failed in MySql [duplicate]

CREATE TABLE bdt.transactions ( `transaction no` int UNSIGNED NOT NULL AUTO_INCREMENT, data date , by int NOT NULL , hours int NOT NULL , ...
0
votes
1answer
10 views

Issue when connecting to open shift via mysql workbench on Mac

I am trying to connect to open shift with mysql workbench on an iMac. A colleague has shown me his setup on Windows which looks exactly as follows (other than the usernames / passwords changing) ...
0
votes
0answers
13 views

counting values of unread values using mysql and php

I am building a messaging system using mysql and php. I have gotten to a point where I want to select messages received by a user and also count the unread messages received from different users to ...
-1
votes
1answer
31 views

“Backup mysql database by copying the data file even when MYSQL server is running” solution! Is there any problem for this backup solution?

I am using MYSQL-5.0.27 I have 2 exact same MYSQL folder "mysql-5.0.27-win32". One in the Virtual Private Server (VPS) & the other in Local PC. At the beginning, these 2 folders are exactly the ...
0
votes
0answers
19 views

MySQL Clustering : Split data across multiple database server [on hold]

We are implementing a chat application in android,IOS. we have to maintain all the messages on server. So i am planning to use 2 databases. One database will contain messages only. while second ...
0
votes
0answers
19 views

MySQL insert Needed data only then send it to crystal report

I'm Working on a big project more than 200 table, I'm using MySQL(Percona), Java & Crystal Report JRC. I have some reports which so big & has a lot of joins between multiple tables. Inside the ...
0
votes
1answer
26 views

Exporting Very Large Database from mysql 5.5

Before I proceed, I would like to confirm can I export a very large table of 3.6GB size using the MySQL Admin Export feature. I have exported tables of small size like 28 MB but just wondering ...
0
votes
1answer
31 views

Can't find source code for building mysql

I'm trying to follow the instructions for building MySQL from source. They guide me to a link where I can download the latest GA. I end up at the downloads page, where I can download ...
0
votes
2answers
29 views

primary_key problem in MySql view

I have 3 tables. and I want to create a view. There is no problem about generating SQL qeury and creating a view. but when I want to use this view in my web app it says me (LIKE THIS): "your view's ...
0
votes
2answers
34 views

What I should choose? [closed]

I'm Dentist by profession. I want to create database which will contain my all clinical information including patient's name,complaints to how much did patient paid and how is the balance and his ...
0
votes
1answer
32 views

How to join 3 tables together given 2 many-to-many relationships tables in between?

I have 3 main tables: Person, Publication and Conference and 2 many-to-many link tables in between: person_publication and person_conference I want to join all 3 main tables together (showing me all ...
0
votes
2answers
43 views

Which files in the “MySQL-5.0.27-win32” folder do i need to backup?

Ok, I am using a pretty old MYSQL "mysql-5.0.27-win32" and the file and the structure maybe different from the latest Mysql (mysql 7). Here is the current structure of of mysql-5.0.27-win32: In ...
0
votes
1answer
20 views

Which file in “MySQL-5.0.27-win32” folder do i need to backup?

Ok, I am using a pretty old MYSQL "mysql-5.0.27-win32" and the file and the structure maybe different from the latest Mysql (mysql 7). Here is the current structure of of mysql-5.0.27-win32: In ...
0
votes
1answer
15 views

how to change mysql table auto_increment primary key

Now i have a table with Auto_increment id as Pri key, and exchange_id as key, How could I change the primary key to field [ticker]..?
1
vote
1answer
66 views

Optimizing large MySQL SELECT WHERE IN clauses

How can the following SELECT WHERE IN case be optimized? I have a table with over 100 million rows with only 3 columns. The primary key (col1) is a 127 varchar. I am performing a SELECT col1 WHERE ...
0
votes
0answers
22 views

mysqlcheck --repair a specific table?

I logged in my server via SSH and committed a "repair table xxx" query on a MyISAM table with 34 million rows and 69GB of data. Unfortunately the SSH connection was lost. When I logged back in I found ...
1
vote
2answers
48 views

Mysql LEFT JOINing same table twice

mysql> SELECT * FROM customers; +----+------+ | id | name | +----+------+ | 1 | Matt | | 3 | John | +----+------+ mysql> SELECT * FROM purchases; +----------+------+-------+ | owner_id | type ...
0
votes
0answers
26 views

Mysql table with only two columns, nothing unique: Will an index increase search performance?

If my table only has two columns (username, groupname) and a million or so rows, will an index improve performance at all? Wouldn't it take just as long to search the index file as it would to search ...
1
vote
1answer
24 views

table exists on 'show tables' - can't query

Anybody know why this his happening? mysql> show tables; +-------------------+ | Tables_in_photos | +-------------------+ | captions_images | | image_meta | | mentions_images | ...
0
votes
1answer
23 views

Can I generate binary logs if they weren't turned on?

Ok, so here's the scenario: Our master went down, boom! gone (Call this one DB1) We switched our backup replica server. Ok, life is good, sort of (Call this DB2) Binary logs were not turned on for ...
0
votes
1answer
30 views

Varchar indexing

I am very rusty with MySQL and I'd like some advice. I have several software tools that are deployed throughout the company and I am writing a DLL to keep track of the usage, errors and stuff of some ...
0
votes
1answer
35 views

How performance schema in mysql 5.6 improve performance?

Since MySQL 5.5 performance_schema database has been added likewise information_schema. As we know that tables in information_schema contains statistical information like tables, plugins, partitions, ...
0
votes
0answers
17 views

Insert XML remote data into MYSQL [migrated]

I have this code i am using to insert data into a mysql database. <?php $xmlDoc = new DOMDocument(); $xmlDoc->load(".....url"); $mysql_hostname = "localhost"; $mysql_user = "root"; ...