Tag Info

New answers tagged

1

Your first HUGE mistake (as @ypercube pointed out) is not using a DATETIME type for a date-time type variable. TIMEs are not VARCHARs and doing this will mess up your queries, make your app non-portable and will confuse the optimiser. The other HUGE problem is MySQL. It doesn't perform this sort of query properly. Your query is ambiguous - PostgreSQL for ...


1

It turned out to be an issue with our Proxy Server, blocking downloads from percona.com Running sudo apt-get update revealed that every connection to percona.com 'failed', and so I got that added to the approved list, and after that it installed fine.


0

The question is not very clear but my guess is that the values are updated with nulls because your IFs have null in there! Change the statement to: UPDATE charged AS u INNER Join mis_charged AS v ON v.id = u.id SET u.act_val = if(v.DAYS = u.Activation_date, USG, NULL), -- NULL -- if you want null when the condition fails ...


0

Yes. There is not much else to say about your question. If you have recovered the mysql.proc table, but not the databases, you may see the procedures but not the databases. This is because you can export and import them logically "--routines", which will create CREATE PROCEDURE statements, or physically, recovering the mysql.proc table. In any case, they ...


0

All stored procedures and stored functions, whose code is written in the MySQL Stored Procedure Language, reside in mysql.proc. You can see how many of each with this SELECT COUNT(1) rowcount,type FROM mysql.proc GROUP BY type; The only time I have ever seen mysql.func is in context with AGGREGATE functions: According to MySQL Documentation on CREATE ...


0

You are best to start with a transactional database that records the data in as much detail as you can get from the source. You can always summarize and report from detailed data, but you can't go backwards from summary information to detailed information. If you are getting data in the form: transaction_date datetime , pallets_taken_in int , ...


0

This is quite an easy one really (one of those "Doh" moments :-) ). You set it in my.cnf, as described here or also as explained in the MySQL documentation here.


1

MySql doesn't support recursive functions. It supports recursive stored procedures but this feature is disabled by default. See manual. Recursion uses stack space to store contexts and tends to put memory pressure into server. I strongly discourage to use stored procedures to do this kind of calculation, better to do them into the application code. Anyway ...


1

Your question is about troubleshooting, not about 'fixing' the CPU issue. Nearly all CPU issues can be traced to bad/missing indexes or poorly written queries. Do you have the slowlog turned on? With long_query_time = 2? Can you run pt-query-digest? Well, probably you said no to all of those. Pursue them for future use. Can you do SHOW FULL ...


1

You have to use the mysql client to reload mysql -u root -p -Ddatabasename < /home/databasename_bkup.sql Another way to reload would be mysql -u root -p -Ddatabasename then from the MySQL prompt, do this mysql> source /home/databasename_bkup.sql If you would like the mysqldump to drop and recreate the database for you, create the dump like ...


0

You can consider using scaledb , it's a new solution for mysql that saves the need for partitioning tables, and sharding and it also gives quite a good performance and enables you to use less RAM memory in you system and easily scale the system as it grows. I am not sure about pricing for small scale system , it might be free or at least affordable even for ...



Top 50 recent answers are included