Mysql Shuts Down During Rapid Execution Of Querys
I am using version 4.0.12-nt of MySQL and when I hit the enter key
rapidly I can't connect to the database. The result is a message is
returned to me from mysql that says I can't connect because the
database is down. If I only hit the 'enter' key once (to execute the
page that my queries are on(their are four queries on this particular
web page)) my queries execute just fine.
We have noticed that this only happens when we:
View Complete Forum Thread with Replies
Related Forum Messages:
Rapid Web Application Development Framework For MySQL
I am searching for a rapid web application development framework for the MySQL database. In particular I am searching for an equivalent to the Application Express framework of Oracle (http://apex.oracle.com/i/index.html) for the MySQL database. I need to create an interface that allows users to simply create records in the database (e.g. through forms) and must be able to support more elaborate functionalities such as creating wizards or providing different and customized views to the database. Ideally all this works in a web browser.
View Replies !
MySQL Shuts Down ...
The mysql server seems to 'shut down' automatically. Im not sure if this shutting down occurs when root logs off the machiene or if its somthing else (perhaps a certian period of server inactivity?) Can anyone tell me what this could be caused by and how to fix it? Here's a further explination of what happens: Last evening I was logged in as root. I noticed that the database server had shut down. I knew this because Im in the process of seting up phpBB2 on the machiene and when I attempted to load the bulliten board's index.php page I got the following error: phpBB : Critical Error Could not connect to the database So I checked in the 'services' panel and in the mysql server section some text indicated that the server had halted. I ensured that the service was checked (so that it starts with the machiene) and then re-started it. Mysql started up fine, and I could sucessfully load phpbb's index.php page again. I loged out of the machiene. Now today, when I attempt to load index.php Im getting the same error msg. Whats going on here?
View Replies !
Mysql Shuts Down Overnight
I got apache 2.0 + MySql 3.23.52 + PHP 4.3.1 on a Redhat 8.0 server. Somehow MySQL automatically shuts down overnight, anyone has a reason for this? Might because of cron?
View Replies !
Two Querys In One
How can I make this both querys be only one recordset? select distinct grupo from sentient_campos where id_madre = 1 select distinct grupo_madre from sentien_campos where id_madre = 2
View Replies !
SQL Server Shuts Down On Logout OS-X 10.4.9
I have managed to get a MySQL Server Running on my G5 Power Mac, however the server only seems to be running when I am logged in. As soon as I log out the Server seems to shut down aswell, although I have set it to run at system startup (with the tickbox in the system pref.). Is there a way to have the server running in the background as long as the system is up, no matter which user is loged on (or no user just the login screen for that matter)?
View Replies !
Merging Two Querys
I have two query that I I would like to be one, but I can't figure out how to do it. (mysql 3.23) $sql = sprintf ("SELECT task,SUM(hours),login FROM activities WHERE login='%s' group by login",$usuario); $sql2 = sprintf ("SELECT SUM(hours) FROM activities WHERE login='%s' AND month='%s' group by login",$usuario,$getdate);
View Replies !
Multiple Querys
I'm working on a query where I'd like to be able to search one OR two attributes. I've come accorss a few postings that lead me to the code below. It works fine if I put something in both attributes but fails if I leave the second blanc. Can you help? SELECT * FROM books WHERE title LIKE '%$title%' AND title_sub LIKE '%$title_sub%' ORDER_BY print_id (p.s. I would lideally like to make the first attriubute optional. I may also want to add a few more attributes later)
View Replies !
Dates In Querys
I'm returning the month from a datatime stamp in a mysql query using the following: MONTH(theDate) AS tMonth Only problem is, if the month is before november, it doesnt not return the preceeding 0, so for example.. september I only get 9 not 09. Is there any way in the query to define this?
View Replies !
Multiple Querys Into One
How can I reduce multiple querys into 1 I have 1 main select PHP //get all the booking data from the tables, now I need to $cust_sql = mysql_query("SELECT DISTINCT customer.bid, customer.oid, customer.c_name, customer.pnumber, customer.mnumber, customer.party_names, customer.paid, booking.startdate, booking.enddate, booking.cid, booking.resort, booking.villa, booking.vtype, booking.adults, booking.children, booking.infno, booking.outfno, booking.atime, booking.cost FROM customer,booking WHERE customer.bid= '" . $_GET['id'] . "' AND booking.id='" . $_GET['id'] . "'"); if (!$cust_sql) { echo 'An error has occured with the db and is detailed below:<br> ' . mysql_error(); exit; } $row = mysql_fetch_row($cust_sql); I then run a another to return the country name using the booking.cid from the main result set. PHP $country_sql = mysql_query("SELECT DISTINCT country_name FROM country WHERE cid = '".$row[14]."'"); Is there a way to condense the 2 or more queries into the main one.
View Replies !
Sql Error - Shuts Down The Website In 5 Seconds
There is a program called as D4 and it sends a huge data to the sql database and it slows down the website in the first 2-3 seconds and then in a few seconds it shuts down the website until s/he stops using the program. We made a huge research over the internet, but we couldn't find any solutions for this. It can shut down any website, that's having a sql based database. I hope you can help us with this problem. Thank you for your attention and time. if the site admins want to get the program, they can contact us. However, they should be aware that this is a dangerous program so it shoudn't be distrubuted.
View Replies !
20 Different Tables Querys Slowing Page Display
I have an issue with a very large PHP page that calls over 20 different MySql Statements. This page is loading somewhat slow and i want to speed things up. I have looked into sql caching applications like http://eaccelerator.net/ and http://www.danga.com/memcached/ which i may install later, but i feel they are more for pages that are called frequently, my page calls the same data less times but can call more than 2000 different versions of the data. Being that my page is a little over 1000 lines, putting it all here is not gonna happen. I will try to shorten the code using examples... After writing the blow code.. it may be really confusing. I have stuck the file on my server http://www.empiresolutions.net/clien.../green_bar.zip in case anybody whats to get a better look. This file in it current state works fine, just is slow. Any and all help is so appreciated. Another Question... Can anyone provide suggestions on how to bench-test my sql scripts to see exact improvment speeds? Each indent means the following query is nested. Query 1 (2 Join Tables) Query 2 (2 Join Tables) Query 3 (1 Table) Query 4 (4 Join Tables, While Loop) Query 5 (2 Join Tables) Query 6 (1 Table) Query 7 (4 Join Tables, While Loop) Query 8 (2 Join Tables) Query 9 (1 Table) Query 10 (1 Table, While Loop) Query 11 (2 Join Tables, Calls every 10 rows from Query 10) Query 12 (2 Join Tables, Calls every 10 rows from Query 10, same as Query 11 basically) Query 13 (2 Table, While Loop) Query 14 (1 Table) Query 15 (2 Join Tables, This query and subs are called 4 times in a FOR loop) Query 16 (2 Join Tables) Query 17 (2 Join Tables) Query 18 (1 Table) Query 19 (2 Join Tables) Query 20 (1 Table)
View Replies !
Mysql WHERE Condition Execution
I have 2 columns and I search rows with two conditions. SELECT * FROM table WHERE A = '$a' AND B = '$b' How can I make mysql search columns with A condition first and after that within these condition B. I would like to know, how mysql search works. How can I tell mysql how to search?
View Replies !
Mysql Execution Sequence
I need to retrieve the last value from a column in a mysql table, perform some actions on it, then add 1 to the original value and store a new entry. I am worried that if multiple users access the database at the same time I will end up with duplicated 'new values'. Does mysql complete execution of a script before it allows access to another user or do I need to 'lock' the table in some way while the script executes?
View Replies !
Measure Execution Time Of Mysql Script
I am trying to measure the total execution time of a mysql script that I run using the mysql command line client in batch mode (-e "source myscript"). The --tee option does not work for the batch mode so that I could then gather and add up the execution times of the SQL queries as logged by the server. Adding a tee command in the script itself is not working. Using the time command (in Linux , and timex is not available) on the mysql program is also not helpful as I think it does not include the execution time of the queries on the mysql server side, but only the system and user times corresponding to the client process.
View Replies !
Can't Connect To MySQL Server On 'localhost' (10061) On Script Execution
Whenever I run this script: <?php $mysqli = mysqli_connect("localhost", "root", "rootnow"); if (mysqli_connect_errno()) { printf("Connect failed: %s ", mysqli_connect_error()); exit(); } else { printf("Host information: %s ", mysqli_get_host_info($mysqli)); mysqli_close($mysqli); } ?> I get this error message: Connect failed: Can't connect to MySQL server on 'localhost' (10061) I'm running Apache 2.0.58 with PHP 5.1.4 and MySQL 5.0.20 on Windows XP Home Edition.
View Replies !
Maximum Execution Time Of 300 Seconds Exceeded (was "MYSQL Error")
I have a huge database 400mb+ in size which i have exported into a .sql file. I tried to run this export script into a new database and it runs fine until three quarters into the scripts execution and the following error appears: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<br / > <b>Fatal error</b>: Maximum execution time of 300 seconds exceeded in <b' at li ne 1 I believe this error may relate to "delayed_insert_timeout = 300". How do I increase this limit in mysql - maybe it may solve the problem but then again it may not . Any advice is most gratefully appreciated - As you can imagine if the script runs fine for 3/4 of it and then an error appears, stating the error is on line 1, it will take me days to go through the whole script (hundreds of thousands of rows) to find the error as I assume the error does not reside on line 1 as this line would have been executed. I am running the script on mysql 5, and via source /path/****.sql on linux.
View Replies !
Ending Of Execution
is it important to free resources and end connection after every code execution... i found a few codes examples and they don't usually end with DIE or EXIT... so i'm curious if thats a security risk?
View Replies !
Execution Time
After we execute a statement in mysql, it reports the query execution time in the format: n rows in set (t sec). We may do something like this to get the execution time: $time_start = getmicrotime(); mysql_query( "" ); $time_end = getmicrotime(); $time = $time_end - $time_start; But it includes extra CPU time to run two getmicrotime() functions and one subtraction. Is there any way to obtain the execution time directly from mysql without running extra functions or calculations?
View Replies !
Log Execution Queries
I am writing a program in python, and I use mySql v1.2.12, I wanna know If mysql logs any command such as wxecution commands(like INSERT, UPDATE, DELETE), if yes how can i access them? thanks all
View Replies !
Asynchronous Execution
I have the following situation php file 1: an SQL writes data to the database php file 2: an SQL reads data from the database Some users report errors that MIGHT be due to the SQL in file 1 not being executed, before they click on a link to open file 2. So they get out of date information. I want to know if this is technically possible, whether this might indeed be the problem, that if a database is very busy, that SQL statements are queued and data retrieval may read obsolete out of date information, because the data storage SQL has not been executed yet. And if this is the problem, I would like to wait in file 1 until the data has actually been written.
View Replies !
How To Get Time Execution Of A Query?
Do you know how to get the time that a query executes? Is there a formula on how to get it? Example: Note: I have 5000 data in the table cars $result = mysql_query("Select * from cars"); Question: How to get time of executing the query above?
View Replies !
Improve The Execution Time
i am new to db2 want to ask questions about the performance of my sql commands for a view based another 3 views the sql commnads are as following: create view b_central_subgroup as select communicator as central_member, project_id as project_id from b_normalized_communicator intersect select initiator as central_member, project_id as project_id from b_normalized_initiator intersect select monospeaker as central_member, project_id as project_id from b_normalized_monospeaker it takes 4.4 seconds to execute this sql. it likes that the time is the summ of the other three views. Can the execution time be reduced through some other methods? If it is possible , then how ?
View Replies !
How To Get Query Execution Time
How to get query execution time in "mysqlquery.log" files I am using: Linux 7.3 mysql 4.1 How to display the query execution time for each and every query in log files. i have configured "slow-log-query" and "mysqlquery.log" in "my.cnf" is pasted below. log = /var/lib/mysql/mysqlquery.log log-slow-queries = /var/lib/mysql/slowquery.log long-query-time = 0 slow-launch-time = 1 then i can get a output in "mysqlquery.log" like, 070830 9:24:29 2 Connect root@localhost on 2 Init DB jbdatabase 2 Query select count(*) from vacancy1_table 2 Query select category,listcategory from category_t able order by category 2 Quit but i need to display the "timetaken of each end every executed query" along with the query in the above logfile like, E.g:select category,listcategory from category_table order by category(0.03 secs).
View Replies !
Query Execution Too Slow!
I have migrated from MySQL 4.1.22 to MySQL 5.0.45. Many of the queries that were working on my old server is working too slow in my new server(MySQL version 5.0.45). I am not aware why is this happening. Actually there is no error message or query failing. The query is executing, but the time taking to execute the query is too long. This problem is not occurring for all queirs, but only for some complex queires, that is queries with Left Join or Right Join, Group By etc. I have also checked the MySQL details through SSH(that is by mysql> SHOW VARIABLES;) Now one thing I found is there is lot of difference in key_buffer_size, table_cache, join_buffer_size, read_buffer_size, read_rnd_buffer_size , table_cache etc between my new server MySQL and old server MySQL. Will this be the reason for query execution taking too much time. Can any one guide me why this is happening. The striking thing is that these quires was working very much fine and faster in my old server.
View Replies !
Measure Execution Time
I would like to measure the execution time of my queries in order to evalutate the performance in/decrease for different changes. Even if I use 'sql_no_cache' the query executes MUCH faster the second time I run it, and is therefore not representative of the true performance. How to I avoid this problem? I'm using MySQL 4.1 on a windows server 2000. I be glad to get an explanation to why the query executes faster the 2nd time.
View Replies !
Last Query Execution Time
Is there a way to retreive the elapsed time for the prevously executed query? Alternatively, Is there a way to query the current time in fractions of a second? I am attempting to use a stored procedure to execute and track the time it takes to run some queries and other commands. The logic of the stored proc would go something like this.....
View Replies !
Query Log With Execution Time?
I have developed a big property portal web site and have probably written about 1000 different SQL queries in the process (OK, maybe only 500 or so) but a lot. The site is now gaining popularity and although it is on a dedicated server I want to make sure that everything is running smoothly. I have optimised several tables with indexes etc. and have sped up certain tasks, but would like to know if there are any other queries that take too long and should be optimised. Is there a way to log all queries together with the time it took to execute the query? Is this already logged and if so - where is it?
View Replies !
Slow Query Execution
Right now I am fazing one issue which is getting hell out of me. I am explaining the issues step by step. 1.I have one site running from last 3 years with large database and there is one main table which has maximum load. 2.Now, I have redesigned the site with lots of changes within this table too. 3.The problem is that the server is same, queries are same but output in the new database is taking 50 times more execution time. 4.I also just copy paste the table, and fire the same query... Strange even that is not working... Is it something where newly added table or database is having issues in the server? I have tried all, compared the structures of the data and table but still the query result is too slow on live testing sever. While same query in main site of same server is running perfectly.
View Replies !
Copying Table To Disk During Execution
I seem to be having an issue with a query's results being paged out to disk during runtime. I notice in processlist it saying "Copying to tmp table on disk". select col1, col2, count(ip) as 'COUNT' from db.table group by 2 order by 1, 3; None of the columns are a primary/foreign or an index. This query returns 92K rows and has taken anywhere from 50 seconds to run to over 1.5 minutes. The table size on disk is around 33MB. After doing some research i found that i should be changing the tmp_table_size system variable. Originally it was set to the MySQL default, 33554432. I set the varaible to 90,000,000 and it still started paging out to the disk (this was the only query running at the time). I would think that 90MB in space would have been enough to handle the query since that would assume over 600K row size. I actually had some trouble setting the tmp_table_size for the global variable but was able to change it as a session variable. I have also tried altering the query_cache variable (which has only slowed the query down - currently it sits at a size of 50MB) and also the sort_buffer_size but neither have made a difference. What is the magic variable that i should be messing with?
View Replies !
Query Execution Time In PHP Script
I am interested in displaying the query execution time as mysql does from the console, but using php. I've looked everywhere for this and can't find anything. Does anyone know how to display this information to the browser via php? The information must be there since the console provides it. I checked the php function mysql_info(), but that only shows records, duplicates, deleted, matches, changed, warnings, etc. Didnt see any specific php function for getting execution time.
View Replies !
Report Of Query Execution Times
Does mysql have a tool to record and report a list of all queries executed and how long it took to execute each query? If not can anyone suggest a tool I can use to do this? I've heard of mysql query profiler but does it capture queries from all sessions?
View Replies !
Query Execution Time & Mysql_stat
I am using mysql for my shopping site,Performance of site very slow then I used mysql_stat php function to find out how many slow queries,it shows 20. Now my question is any function in mysql(or)PHP to show 20 slow queries.
View Replies !
Database Size And Max Execution Time
I have now got a large database that is getting to a size of about 4Mb when downloaded (dumped / uncompressed).On my Web server everything seems fine. But when using said database on my home server (localhost) I am recieving Max Execution time of 30 second errors constantly.How can I stop this from happening and is it likely to start happening on my web server soon?
View Replies !
Slow Query Execution With Strange Issue
Right now I am fazing one issue which is getting hell out of me. I am explaining the issues step by step. 1.I have one site running from last 3 years with large database and there is one main table which has maximum load. 2.Now, I have redesigned the site with lots of changes within this table too. 3.the problem is that the server is same, queries are same but output in the new database is taking 50 times more time. I have tried all, compared the structures of the data and table but still the query result is too slow on live testing sever. While same query in main site of same server is running perfectly. Have any one fazed such and issue? Please help me out of the situation as site is ready but I m not able to put new version live.
View Replies !
Check Query For Syntax Prior To Execution
I was wondering if it was at all possible to check an SQL query prior to execution for syntax errors? A method which wouldn't alter the data to which the SQL statement related to. I'm guessing you could perform a transaction of sorts, but is there another way?
View Replies !
Printing Debugging Info Into A File During Script Execution
I've got a very large script (~50GB) that takes a very long time to execute. I want to echo text into a output file at various places during the execution. Something like: ... select 'message 1'; ... select 'message 2'; ... If the script is: doit.sql, then I just do: mysql -uUSER -pPASS < doit.sql > log.out The problem is that I can't see the information in log.out because STDOUT is not flushed until the buffer is full. So, I thought I'd do something like: select 'message 1' into outfile 'log.out'; Unfortunately, mysql doesn't append to log.out. So, how can I get logging information into the log.out file so that I can let the script run in the background and just do something like: tail log.out to see the most recent messages and know that they are not being kept in some buffer pending output. This script takes about 2-3 days to complete and I want some method of seeing what things the script has done. The messages I have in the sql script make it very easy for me to know just what has been done, but don't do me any good if they're in some darned STDOUT buffer.
View Replies !
Slow Execution For A Left Outer Join Query
Whats likely to be the cause of slow execution for a left outer join query? The original query joins three tables but even if I narrow it down to one it still takes a long time to execute. $query = "select distinct materials.* from materials"; $query .= " left outer join materials_products on materials.material_id = materials_products.material_id"; There's 914 rows in the materials table and 1348 row in the materials_products table Is it likely to take a long time for this amount of data or is there likely to be a problem in the table(s) set up or query?
View Replies !
|