Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Previous 30 Newer Entries Showing entries 121 to 150 of 646 Next 30 Older Entries

Displaying posts with tag: innodb (reset)

REPEATABLE READ vs READ COMMITTED
+2 Vote Up -0Vote Down

There are four SQL transaction isolation levels supported by InnoDB: REPEATABLE READ, READ COMMITTED, READ UNCOMMITTED, and SERIALIZABLE. Because READ UNCOMMITTED and SERIALIZABLE are rarely used, I am going to outline the distinction between READ COMMITTED and REPEATABLE READ. Perhaps I will follow up with SERIALIZABLE and READ UNCOMMITTED if there is interest.

REPEATABLE READ:
The state of the database is maintained from the start of the transaction. If you retrieve a value in session1, then update that value in session2, retrieving it again in session1 will return the same results. Reads are repeatable. Repeatable Read.

session1> BEGIN;
session1> SELECT firstname FROM names WHERE id = 7;
Aaron

session2> BEGIN;
session2> SELECT firstname

  [Read more...]
Deploy MySQL Cluster 7.2 GA in 288 seconds
+3 Vote Up -0Vote Down
It seems that our friends at Oracle have been pretty busy with the GA release of MySQL Cluster 7.2.

This is not just old wine in new bottles.

While it may be a dot release, it does appear to be a more significant step forward than a dot release would imply.

First off, we are very excited to announce that the Severalnines Cluster Configurator now includes support for 7.2 GA.

As the title of this blog suggests, it is possible, as we have experienced, to deploy 7.2 GA in 288 seconds, i.e. just a few minutes. This was done on m1.large instances on Amazon. We have published a quick how-to deployment guide for Amazon here:







  [Read more...]
InnoDB Tablespace Automatically Expanding Issues
+1 Vote Up -0Vote Down
I recently received a question asking about InnoDB and the ability to autoextend the ibdata files.

The question was basically this:
If the database has 1 ibdata file that is using autoextend but also has a max value set, will it start a new file once the max value is reached.

The answer is no it will not create a new file.You are able to use autoextend and have more than 1 ibdate file though.

For example I made a simple example via a virtual box.

Started using:
innodb_data_file_path            = ibdata1:20M:autoextend:max:100M
innodb_autoextend_increment        = 50M

 I downloaded the full employees dataset from launchpad.

Started














  [Read more...]
A super-set of MySQL for Big Data. Interview with John Busch, Schooner.
+0 Vote Up -0Vote Down
“Legacy MySQL does not scale well on a single node, which forces granular sharding and explicit application code changes to make them sharding-aware and results in low utilization of severs”– Dr. John Busch, Schooner Information Technology A super-set of MySQL suitable for Big Data? On this subject, I have interviewed Dr. John Busch, Founder, Chairman, [...]
The relationship between Innodb Log checkpointing and dirty Buffer pool pages
+2 Vote Up -0Vote Down

This is a time-honored topic, and there’s no shortage of articles on the topic on this blog. I wanted to write a post trying to condense and clarify those posts, as it has taken me a while to really understand this relationship.

Some  [Read more...]

New England’s Victory (for Big Data)
+1 Vote Up -0Vote Down

While it might not have been New England’s weekend on the Big Gridiron, it was certainly New England’s day for Big Data at the New England Database Summit on Friday at MIT.

The summit was well attended, with 350 registrants and keynotes from prominent MySQL users such as Mark Callaghan. The coverage was quite broad, with presentations running the gamut from grad students (complete with bodyguards and intimidating academic

  [Read more...]
ANALYZE TABLE is replicated. RTFM.
+0 Vote Up -0Vote Down

Sometimes, I make mistakes. It’s true. That can be difficult for us Systems Engineering-types to say, but I try to distance myself from my ego and embrace the mistakes because I often learn the most from them. ..Blah, blah, school of hard knocks, blah, blah…. Usually my mistakes aren’t big enough to cause any visible impact, but this one took the site out for 10 minutes during a period of peak traffic due to a confluence of events.

Doh!

Here is how it went down…

We have an issue where MySQL table statistics are occasionally getting out of whack, usually after a batch operation. This causes bad explain plans, which in turn cause impossibly slow queries. An ANALYZE TABLE (or even SHOW CREATE INDEX) resolves the issue immediately, but I prefer not get woken up at 4AM by long running query alerts when my family and I are trying to sleep. As a

  [Read more...]
1 Billion Insertions – The Wait is Over!
+4 Vote Up -0Vote Down

iiBench measures the rate at which a database can insert new rows while maintaining several secondary indexes. We ran this for 1 billion rows with TokuDB and InnoDB starting last week, right after we launched TokuDB v5.2. While TokuDB completed it in 15 hours, InnoDB took 7 days.

The results are shown below. At the end of the test, TokuDB’s insertion rate remained at 17,028 inserts/second whereas InnoDB had dropped to 1,050 inserts/second. That is a difference of over 16x. Our complete set of benchmarks for TokuDB v5.2 can be found here.

  [Read more...]
Building MariaDB 5.1 on Windows
+2 Vote Up -0Vote Down

Recently, I found myself needing MariaDB 5.1.60 for Windows for some testing purposes. Therefore, I needed to build it from source. I ended up using what I’d call a “blend” of the commands listed in this “how-to” and the readme file INSTALL-WIN-SOURCE, so I thought I’d post those steps.

  • Download 5.1.60 MariaDB source from here.
  • cd C:\mariadb-5.1
  • win\configure.js
  • cmake .
  • VS: File -> Open -> Solution -> MySql.sln
  • VS: Build -> Build Solution
  • VS: Right-click “PACKAGE” -> Build (in “Solution Explorer” View)

    That’s it.

    Let’s fire it up:

    MariaDB> select version();
    +----------------------+
    | version()            |
  •   [Read more...]
    Fractal Tree Indexes and Mead – MySQL Meetup
    +2 Vote Up -1Vote Down

     
    Thanks again to Sheeri Cabral  for having me at the Boston MySQL Meetup on Monday for the talk on “Fractal Tree® Indexes – Theoretical Overview and Customer Use Cases.” The crowd was very interactive, and I appreciated that over 50 people signed up for the event and left some very positive comments and reviews.

    In addition, the conversation spilled over late into the night as we made our way over to nearby Mead


      [Read more...]
    Tracking Server Variables, Documentation, Manuals, Changelogs for MySQL, InnoDB, MariaDB, and XtraDB
    +1 Vote Up -0Vote Down

    I find myself constantly looking up server variables (and manuals and changelogs) for MySQL, MariaDB, and XtraDB, which versions they are in, and so forth. So I finally created a couple pages which contain the links to all of these various bits of information across the various flavors of MySQL.

    I’ve been using them every day, so I thought some others might want to bookmark these as well.

    I’ve created the following:

    o Changelogs
    o Documentation
    o Server Variables
    o InnoDB Plugin Versions

    The Changelogs page contains links for MySQL 3.23 up through 5.6, MariaDB 5.1 – 5.3, XtraDB 5.1 – 5.5, Xtrabackup 1.3 – 1.6,




      [Read more...]
    FictionPress Selects TokuDB for Consistent Performance and Fast Disaster Recovery
    +1 Vote Up -0Vote Down

    FictionPress

    Issues addressed:

    • Support complex and efficient indexes at 100+ million rows.
    • Predicable and consistent performance regardless of data size growth.
    • Fast recovery.

    Ensuring Predictable Performance at Scale

    The Company:  FictionPress operates both FictionPress.com and FanFiction.net and is home to over 6 million works of fiction, with millions of writers/readers

      [Read more...]
    Profiling your slow queries using pt-query-digest and some love from Percona Server
    +2 Vote Up -0Vote Down
    This guide will get you up and running with how to identify the bottleneck queries using the excellent tool pt-query-digest. You will learn how to use and analyze the output returned by pt-query-digest. You will also learn some differences between slow query logging in various MySQL versions. Later on in the post I will also show you how to make use of the extra diagnostic data available with Percona Server.
    Learning to love the InnoDB Lock Monitor
    +3 Vote Up -0Vote Down

    A customer opened a support issue to ask about some help determining why they were seeing a lot of Lock Wait Timeouts. I asked them to enable the InnoDB Lock Monitor so that I could get a look at what was going on in their transactions and whether there might be some locks held longer than necessary.

    The customer sent in a 184MB MySQL error log with 4773836 lines. I started looking through it, but I could tell I was going to need a better way to get a better overview of the file than what I'd be able to piece together trying to poke through it and look for individual lines. I started piping the file through a variety of UNIX tools to narrow down what I was seeing.

    I ended up with this mess:

     

    It's hideous, but it's pretty helpful. Here's the output:

    1EC080F1  24284
    1EC84325  18196
      [Read more...]
    Improving InnoDB memory usage continued
    Employee_Team +0 Vote Up -0Vote Down

    Note: this article was originally published on http://blogs.innodb.com on Dec 23, 2011 by Vasil Dimov.

    Continues from Improving InnoDB memory usage.

    Here are some numbers from the fixups described in the above article:

    The workload consists of 10 partitioned tables, each one containing 1000 partitions. This means 10’000 InnoDB tables. We truncate the tables, then restart mysqld and run:

    1. INSERT a single row into each of the 10 tables
    2. SELECT * from each table
    3. FLUSH TABLES (this causes the tables to be closed and reopened on the next run)
    4. wait for


      [Read more...]
    Optimizing InnoDB for creating 30,000 tables (and nothing else)
    +3 Vote Up -0Vote Down

    Once upon a time, it would have been considered madness to even attempt to create 30,000 tables in InnoDB. That time is now a memory. We have customers with a lot more tables than a mere 30,000. There have historically been no tests for anything near this many tables in the MySQL test suite.

    So, in fleshing out the test cases for this and innodb_dict_size_limit I was left with the not so awesome task of making the test case run in remotely reasonable time. The test case itself is pretty simple, a simple loop in the not at all exciting mysqltest language that will create 30,000 identical tables, insert a row into each of them and then drop them.

    Establishing the ground rules: I do not care about durability. This is a test case, not

      [Read more...]
    Improving InnoDB memory usage
    Employee_Team +0 Vote Up -0Vote Down

    Note: this article was originally published on http://blogs.innodb.com on Dec 20, 2011 by Vasil Dimov.

    Last month we did a few improvements in InnoDB memory usage. We solved a challenging issue about how InnoDB uses memory in certain places of the code.

    The symptom of the issue was that under a certain workloads the memory used by InnoDB kept growing infinitely, until OOM killer kicked in. It looked like a memory leak, but Valgrind wasn’t reporting any leaks and the issue was not reproducible on FreeBSD – it only happened on Linux (see Bug#57480). Especially the latest fact lead us to think that

      [Read more...]
    Improving InnoDB memory usage
    +4 Vote Up -0Vote Down

    Last month we did a few improvements in InnoDB memory usage. We solved a challenging issue about how InnoDB uses memory in certain places of the code.

    The symptom of the issue was that under a certain workloads the memory used by InnoDB kept growing infinitely, until OOM killer kicked in. It looked like a memory leak, but Valgrind wasn’t reporting any leaks and the issue was not reproducible on FreeBSD – it only happened on Linux (see Bug#57480). Especially the latest fact lead us to think that there is something in the InnoDB memory usage pattern that reveals a nasty side of the otherwise good-natured Linux’s memory manager.

    It turned out to be an interesting

      [Read more...]
    InnoDB 5.6.4 supports databases with 4k and 8k page sizes
    +2 Vote Up -0Vote Down

    In the 5.6.4 release it is now possible to create an InnoDB database with 4k or 8k page sizes in addition to the original 16k page size. Previously, it could be done by recompiling the engine with a different value for UNIV_PAGE_SIZE_SHIFT and UNIV_PAGE_SIZE. With this release, you can set –innodb-page-size=n when starting mysqld, or put innodb_page_size=n in the configuration file in the [mysqld] section where n can be 4k, 8k, 16k, or 4096, 8192, 16384.

    The support of smaller page sizes may be useful for certain storage media such as SSDs. Performance results can vary depending on your data schema, record size, and read/write ratio. But this provides you more options to optimize your performance.

    When this new setting is used, the page size is set for all tablespaces used by that InnoDB instance. You can query the current value with;

    SHOW

      [Read more...]
    Top Ten for 2011
    +0 Vote Up -0Vote Down

     

    It’s almost the end of the year – that means holiday cards, shopping, cooking, parties, and the inevitable year-end top lists (including gems like this one).

    In the spirit of end of year list making, we fed our 60+ blogs this year through Google Analytics to find out what our own top ten blogs were (outside of product announcements). So if you missed an episode of the View (TokuView that is) we’ve got a Tokutek Top Ten for you (spoiler alert – they are mostly technical):

    10. Cage Match: OldSQL, NoSQL and NewSQL – References to

      [Read more...]
    MySQL 5.6.4 Development Milestone Now Available!
    Employee_Team +8 Vote Up -0Vote Down

    I am pleased to announce that the MySQL Database 5.6.4 development milestone release ("DMR") is now available for download (select the Development Release tab). MySQL 5.6.4 includes all 5.5 production-ready features and provides an aggreation of all of the new features that have been released in earlier 5.6 DMRs.  5.6.4 adds many bug fixes and more new "early and often" enhancements that are development and system QA complete and ready for Community evaluation and feedback.  You can get the complete rundown of all the new 5.6.4 specific features here.

    For those following the progression of the 5.6 DMRs as the trains leave the station, you should

      [Read more...]
    MySQL 5.6.4 Development Milestone Now Available!
    Employee_Team +0 Vote Up -0Vote Down

    I am pleased to announce that the MySQL Database 5.6.4 development milestone release ("DMR") is now available for download (select the Development Release tab). MySQL 5.6.4 includes all 5.5 production-ready features and provides an aggreation of all of the new features that have been released in earlier 5.6 DMRs.  5.6.4 adds many bug fixes and more new "early and often" enhancements that are development and system QA complete and ready for Community evaluation and feedback.  You can get the complete rundown of all the new 5.6.4 specific features here.

    For those following the progression of the 5.6 DMRs as the trains leave the station, you should

      [Read more...]
    Slides of my talk on B+Tree Indexes and InnoDB
    +2 Vote Up -0Vote Down
    The slides of my talk on B+Tree Indexes and InnoDB are now available for download. This slide was presented during Percona Live London 2011. You can download the slides from here. There are many other interesting and informative talks that were presented during Percona Live London 2011, and I think you should definitely check them out, if you haven't. They are available here.
    Dealing with Assertion failure in file fut0lst.ic : addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA
    +3 Vote Up -0Vote Down

    I recently wrote an article on dealing with an assertion failure in log/log0recv.c, specifically !page || (ibool)!!page_is_comp(page) == dict_table_is_comp(index->table).

    I mention it because this occurred after a system outage, and I just encountered another system outage (either HDD power outage or some other serious HDD event), with a completely different assertion failure and error message. Similar to the one above, it’s also kind of obscure, so I wanted to post this so people searching for it will find this.

    For reference, the first outage assertion failure was this:

    InnoDB: Assertion failure in thread 139838283589376 in file
    log/log0recv.c line 1094
    InnoDB: Failing assertion: !page || (ibool)!!page_is_comp(page) ==
    dict_table_is_comp(index->table)

    Here is the new assertion failure:

    111201 16:45:00 InnoDB:
      [Read more...]
    InnoDB Plugin Version History
    +4 Vote Up -0Vote Down

    I’m often wondering what version of the InnoDB Plugin is included with which version of MySQL (or MariaDB). The MySQL changelogs used to denote which version of the InnoDB plugin was included with that particular release of MySQL, but sadly this is no longer the case.

    Therefore I’ve compiled a comprehensive list which contains all of this info, and then some (and note all InnoDB Plugin changelog links are provided at the bottom).

    Hope you find it helpful

    MySQL 5.6:

    MySQL     Plugin     Status Date 5.6.4 1.2.4 Milestone 7 12/20/2011 5.6.3 1.2.3 Milestone 6 10/03/2011 5.6.2 1.2.2 Milestone 5       04/11/2011

    MySQL 5.5:

    MySQL      [Read more...]
    Finding Problem Queries, Part 1 - The Slow Stuff
    +0 Vote Up -0Vote Down

    At ideeli, we use a variety of techniques to eliminate single points of failure and contention. These involve load balancing multiple application servers, caching layers, and calls to asynchronous services. However, at the end of the day we have a single master MySQL database. It doesn’t matter how many dozens of application servers are handling requests if the database is stalled. Without the right tools, it can be difficult to determine exactly what the database is doing at any given time. In this two part post, I will discuss some techniques for finding those problematic queries.

    FINDING THE SLOW STUFF

    The MySQL slow query log should be the first stop when looking for queries to optimize. Even with tools like

      [Read more...]
    A Case for Write Optimizations in MySQL
    +2 Vote Up -0Vote Down

    As a storage engine developer, I am excited for MySQL 5.6. Looking at http://dev.mysql.com/tech-resources/articles/whats-new-in-mysql-5.6.html, there has been plenty of work done to improve the performance of reads in MySQL for all storage engines (provided they take advantage of the new APIs).

    What would be great to add is API improvements to increase the performance of writes, and more specifically, updates. For many applications that perform updates, such as applications that do click counting or impression counting, there are significant opportunities for improving write performance.

    Take the following example of click counting (or impression counting). You have a website and want to save the number of times links on your website have been clicked. Your table

      [Read more...]
    Information on Bug#12704861 (which doesn’t exist in any public bug tracker)
    +0 Vote Up -0Vote Down

    Some of you may be aware that MySQL is increasingly using an Oracle-internal bug tracker. You can see these large bug numbers mentioned alongside smaller public bug numbers in recent MySQL release notes. If you’re particularly unlucky, you  just get a big Oracle-internal bug number. For a recently fixed bug, I dug further, posted up on the Percona blog: http://www.mysqlperformanceblog.com/2011/11/20/bug12704861/

    Possibly interesting reading for those of you who interested in InnoDB, MySQL, BLOBs and crash recovery.

    Using SHOW PROCESSLIST and mysqladmin debug Output in Conjunction with SHOW INNODB STATUS
    +3 Vote Up -0Vote Down

    When InnoDB appears hung, I know the natural reaction is to check SHOW ENGINE INNODB STATUS.

    In fact, it’s the first thing I check when InnoDB tables are involved.

    However, I just want to iterate how valuable SHOW FULL PROCESSLIST and/or mysqladmin debug outputs can be even when it seems mysqld is hung on on InnoDB table.

    Two recent cases I’ve encountered illustrate why.

    Case #1:

    MySQL appeared hung on the following simple, single-row INSERT:

    ---TRANSACTION 0 2035648699, ACTIVE 76629 sec, process no 9047,
    OS thread id 3069426592, thread declared inside InnoDB 500
    mysql tables in use 1, locked 1
    ...
    INSERT INTO test (id, parent, text) VALUES (180370, 70122, 'test table')

    At least that’s what it seemed per the INNODB STATUS, but unfortunately, there wasn’t any further information to go on.

    The next time it occurred, SHOW FULL

      [Read more...]
    Manually Deleting file and DISCARD TABLESPACE are not the only ways to encounter the “ibd file does not exist” Error
    +3 Vote Up -0Vote Down

    I’m sure most of you have seen the following error, and in many cases it’s quite easy to diagnose, as the error message is clear:

    111111 11:11:11 [ERROR] MySQL is trying to open a table handle but the .ibd file for
    table test/t does not exist.
    Have you deleted the .ibd file from the database directory under
    the MySQL datadir, or have you used DISCARD TABLESPACE?
    See http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html
    how you can resolve the problem.

    From the client side, you may see something like:

    ERROR 1146 (42S02): Table 'test.t' doesn't exist

    However, if you know you (or some backup/archive script) did not delete the file, nor did you run ALTER TABLE table DISCARD TABLESPACE, then what else could cause this?

    Well, I recently found a case where it could occur when a truncate table (on an InnoDB table using the plugin with no foreign keys

      [Read more...]
    Previous 30 Newer Entries Showing entries 121 to 150 of 646 Next 30 Older Entries

    Planet MySQL © 1995, 2013, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.