A loop is a programming construct that executes a block of code repeatedly based on a condition. Cursors, on the other hand, are utilized to process each row returned by a SELECT statement. Read on to learn about various loop types supported by MySQL as well as an introduction to cursors.
Ease of use and speedy performance are just two of the many features that make MySQL one of the most popular databases in use today. Unfortunately, a high adoption rate makes MySQL a target for many malicious individuals and organizations. In today's article, Rob Gravelle highlights a few simple but effective ways of beefing up your database security to defend against both local and remote attacks.
One of MySQL 5.6's many optimizations apply to the processing of queries that contain subqueries. These involve transforming a subquery into a semi-join operation, and then treating it like just another join operation for evaluation. Rob Gravelle takes a closer look at the various strategies utilized by the MySQL 5.6 optimizer to achieve this end.
With version 5.5 of MySQL in full production, the LOAD XML statement greatly simplifies the task of importing data from an XML file into a MySQL table, without having to resort to a stored procedure. Rob Gravelle provides a summary of how to use the new LOAD XML statement.
Some good news for MySQL users; version 5.6 includes native full-text support. If you’re not using MySQL, maybe this will be just the impetus you need to make the switch. In today’s article, Rob Gravelle shows you how to take advantage of MySQL 5.6’s Full-text search capabilities.
Rob Gravelle examines some of the challenges in porting your databases between MS SQL Server and MySQL. Today's article shows you how functions may require additional effort on your part to produce equivalent results.
With respect to data types, MySQL and MS SQL Server have some important differences. Chances are that you’ll have to do some mapping to get the correct data when migrating from one to the other. To that end, this article describes the most important data type differences to be aware of between MySQL and SQL Server.
Tokutek has developed a new kind of data structure called a Fractal Tree that is purported to achieve insertion rates of five to twenty times faster in large databases, as in 100 million rows and above. Moreover, these benefits have been shown to continue right on up to fifty billion rows!
Rob Gravelle demonstrates how stored procedures can be used in conjunction with triggers to enhance their effectiveness. In doing so, he examines some of the limitations of triggers as implemented in MySQL as well as ways to circumvent them.
While useful in some contexts, database triggers are not the best option in every situation. There are times when a stored procedure is the preferred solution. The trick is of course, when to choose one over the other. And that is what today's article will attempt to shed some light on.
The result of slavish adherence to 3NF in database design can lead to over-engineering; the evidence of which include inflexible design schemas and cumbersome data retrieval. Rob Gravelle suggests that there are some instances where denormalization may be called for.
If your MySQL database interfaces with applications or is used to generate reports then chances are good that it contains some massive stored procedures. In that case, you had better set up some type of unit testing framework so that you can verify that your SQL code is doing what it should. This article introduces MyTAP, a unit-test suite based on the Test Anything Protocol (TAP).
Viewing the process list is a key step in debugging many common server problems, including bottlenecks, poor performance, deadlocks, connection issues, and many others. In today’s article, Rob Gravelle demonstrates some ways to use the processlist to glean insight into potential server issues.