Tagged Questions
0
votes
1answer
26 views
How to run a SELECT query within while loop in PHP?
Within a SELECT query via PHP while loop, I need to run a mysql SELECT query as
$result1 = $mysqli->query("SELECT * FROM table1");
while ( $row = $result->fetch_assoc() ) {
if ( $row['X'] == ...
3
votes
1answer
32 views
Getting Random Sample from large database MYSQL (No Auto Inc Field)
You were so helpful with my last question, I thought id throw another one at you thats stumping me.
Basically I got a table, requirements from company was it was all supposed to be 1 table so I got ...
1
vote
1answer
23 views
Is there a way to find the least recently used tables in a schema?
Is there a way to find the least recently used tables in a MySQL schema? Besides going into data directories? I was hoping there was a metadata or status trick-- but Update_Time in STATUS and ...
0
votes
1answer
63 views
Am I wrong in table design or wrong in selected index when made the table?
I've build web application as a tool to eliminate unnecessary data in peoples table, this application mainly to filter all data of peoples who valid to get an election rights. At first, it wasn't a ...
0
votes
1answer
16 views
HOW to “SUM” and “JOIN” for single query of a poll results?
I have a poll database as
CREATE TABLE poll_answer
answer_id,
answer varchar(255),
poll_id int(11),
FOREIGN KEY(poll_id) REFERENCES polls(poll_id) ON DELETE CASCADE,
PRIMARY KEY(answer_id)
) ...
-1
votes
2answers
60 views
Help my database isn't performing fast enough! 100M Merge with 6M need < 1 hour!
I have a server right now receiving more raw data files in 1 hour then I can upsert (insert -> merge) in an hour.
I have a table with 100M (rounded up) rows. Table is currently MyISAM. The table has ...
0
votes
0answers
38 views
Replicate database without Internet connection
I'm working on a company where I have a central DB and several agency databases. See the diagram at here. All the databases are identical, just the data can change and in some cases. I've no internet ...
0
votes
1answer
34 views
MySQL+Web-App Performance Issues using different servers
We are having a performance issue with our MySQL servers that does not make any sense. I have read countless articles from many people (mostly Percona) and have made my.cnf tweaks. We have even manage ...
2
votes
1answer
38 views
MySQL Subquery hangs / terrible perfomance
I am using MySQL 5.5.16 @ CentOS.
Please have a look at this query:
SELECT
inventory_ID,
(
SELECT
price_brutto
FROM
_inventory_prices
...
0
votes
1answer
46 views
Is it possible to force drop of mysql tables with FK?
For dropping a table in which a Foreign Key is used in other tables, it is necessary to drop all other tables having FK connection with the corresponding table.
Is there a short way to drop a table, ...
1
vote
2answers
27 views
Innodb table is taking randomly long time to execute the insert query and in show processlist showing as queryend/updating
Innodb table is taking randomly long time to execute the insert query and in show processlist showing as queryend/updating and it happens for the similar queries for the same table and the queries got ...
0
votes
1answer
26 views
ERROR 13 (HY000) When Creating Database
I'm trying to create a database and when I type in CREATE DATABASE epik; I get the error ERROR 13 (HY000): Can't get stat of './epik' (Errcode: 13) I am running kubuntu 13.04 with mysql 5.5.31.
0
votes
1answer
43 views
Do certain string patterns affect query performance on a VARCHAR column?
I am a beginner on MySQL Administration and performance problems. Now this is confusing me.
I have a VARCHAR column identity, the string in it is consisted of a Class type and an id, like note:123, ...
1
vote
1answer
53 views
ORDER BY optimization issue
I have a query:
SELECT
user_details.id , user_details.first_name , user_details.last_name,
user_accounts.name account_name, jtl0.account_id account_id,
user_details.title , ...
0
votes
1answer
53 views
Errors while creating multiple mysql-5.5 instances
I have installed 3rd mysql instance on my testing server.
2 instances already running without any issues.
When I installed 3rd instance by mysql-5.5.30 zip source, it installed successfully but when ...