I've just started learning MySQL's internals but I've got an idea which I want to convert to a question here, to ask people who are already deeper in it. Is it a bad idea to completeley avoid query parsing on the server side and use a binary protocol instead? This way the client parses the query and could cache the statement structure for further usage or another client API uses a NoSQL approach to send the request data to the server.
A special extended edition of Tech Messages for 2010-12-14 through 2010-12-21:
Cisco IOS Hints and Tricks: IOS HTTP client sets
Host: field to IP address
ACL IP Options Selective Drop – Cisco
Most networks do not make use of IP options. You can drop packets that contain options with the "ip option drop" global configuration command.
This tool has it's usefulness. It's especially nice to compare your site to similar sites and see what you can do to improve things.
I am preparing a series of posts related to Sudoku. I am revisiting the “SQL only” solution I posted somewhere else a long time ago… This time, we’ll get serious and optimize everything we can! This lemon will be squeezed to the maximum!
Start your Pharo image (not mandatory since I will provide all necessary SQL scripts) and MySQL server as we’ll try to solve some Sudoku puzzles only with one SQL statement (no stored procedures or functions)!
Part 1 coming soon!
The more I go through others SQL, there are some common mistakes that I see developers making over and over again, so I thought why not start a series of tips that can help developers optimize their queries and avoid common pitfalls. So this post is a part of that series of tips, and this is the first tip "Avoid using a wild card character at the start of a LIKE pattern".
Pagination is used very frequently in many websites, be it search results or most popular posts they are seen everywhere. But the way how it is typically implemented is naive and prone to performance degradation. In this article I attempt on explaining the performance implications of poorly designed pagination implementation. I have also analyzed how Google, Yahoo and Facebook handle pagination implementation. Then finally i present my suggestion which will greatly improve the performance related to pagination.
In database modeling, a m:n relationship is usually resolved by an additional table. But what if this relation is used only for archiving and the number of links in the resulting table is not too high? In that context, I got the idea to store all referring ID's as CSV string directly into a TEXT column of one of the referring tables. I came to this idea, because otherwise I would have to build complicated foreign keys and this way I also save one additional table. Certainly, this only makes sense if the data is not frequently accessed as foreign key. Nevertheless, I would like to tackle the problem, even if the implementation is very MySQL-oriented.
The MySQL query cache can be very useful in environments where data is not modified often, and traffic consists of mostly reads. It can improve performance by quite a bit if used correctly, but can actually degrade performance if configuration, queries, and traffic patterns are not optimized for it.
Let me quickly go over what the query cache is, and what it is not. The query cache does not cache the query execution plan, the full page on disk (which is what the InnoDB buffer pool is used for), DDL statements, or any queries that modify data (INSERT/UPDATE/etc). The query cache *does* cache the full result set of “cacheable” SELECT queries. For a query to be “cacheable”, it must have the following properties:
- It must be deterministic. The query must return the same result set each time that it is run. This means that it may not contain any non-deterministic variables, such as …
My closing presentation at the dedicated MySQL track at ODTUG Kaleidoscope 2010 discussed various techniques and best practices for improving the ROI of developer resources using MySQL. Included in the sections on Design, Security, Development, Testing, Implementation, Instrumentation and Support were also a number of horror stories of not what to do, combined with practical examples of improving productivity.
<p>Imagine we have a user table in MySQL and similarly, a products table. Each user can now busily buy items. But this is not what this article is all about. This article is more about, that users can also favor articles they like. From a database point of view, this represents a <em>m:n</em> relation, which is resolved by an additional table. We now want to display a list of all products and all users who favor a specific article. In real world scenarios, this can be a really big amount of data, but let's bring an approximation later into play and focus on the main idea for the moment. In addition we want to know, if the person who is actually logged in into the system, already favors a certain product.</p>
The need: Often there is a requirement where data in a particular table has to be processed, and the data processing might be slow, while the table might be a one that is used by your application extensively. For example, a logging table that logs page hits. Or there might be an archiving operation that has to be performed on a particular table. Archiving / processing / aggregating records, all these operations are slow and can really blog down a website, combine that with the added overhead if the table that needs to have these operations performed is one that...