<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Primary Key on FromDual GmbH</title><link>https://www.fromdual.com/tags/primary-key/</link><description>Recent content in Primary Key on FromDual GmbH</description><generator>Hugo</generator><language>en-GB</language><managingEditor>oli.sennhauser@fromdual.com (Oli Sennhauser)</managingEditor><webMaster>oli.sennhauser@fromdual.com (Oli Sennhauser)</webMaster><copyright>© FromDual GmbH</copyright><lastBuildDate>Mon, 09 Feb 2026 12:10:00 +0100</lastBuildDate><atom:link href="https://www.fromdual.com/tags/primary-key/index.xml" rel="self" type="application/rss+xml"/><item><title>Learning from the Bugs Database</title><link>https://www.fromdual.com/blog/learning-from-the-bugs-database/</link><pubDate>Thu, 20 Jan 2022 15:05:52 +0000</pubDate><author>oli.sennhauser@fromdual.com (Oli Sennhauser)</author><guid>https://www.fromdual.com/blog/learning-from-the-bugs-database/</guid><description>&lt;p>This week I came across an old known issue reported in May 2010: Master/Slave Replication with &lt;code>binlog_format = ROW&lt;/code> and tables without a Primary Key is a bad idea! Especially if these tables are huge.&lt;/p></description></item><item><title>How the Lack of a Primary Key May Effectively Stop the Slave</title><link>https://www.fromdual.com/blog/how-the-lack-of-a-primary-key-may-effectively-stop-the-slave/</link><pubDate>Tue, 02 May 2017 09:50:52 +0000</pubDate><author>oli.sennhauser@fromdual.com (Oli Sennhauser)</author><guid>https://www.fromdual.com/blog/how-the-lack-of-a-primary-key-may-effectively-stop-the-slave/</guid><description>&lt;p>Most (relational) DBAs and DB application developers know the concept of a primary key (&amp;ldquo;PK&amp;rdquo;) and what it is good for. However, much too often one still encounters table definitions without a PK. True, the relational theory based on sets does not need a PK, and all operations (insert, select, update, delete) can also be done on tables for which no PK was defined. If performance doesn&amp;rsquo;t matter (or the data volume is small, a typical situation in tests), the lack of a PK does not immediately cause negative consequences.&lt;/p></description></item><item><title>Deadlocks, indexing and Primary Key's</title><link>https://www.fromdual.com/blog/deadlocks-indexing-and-primary-keys/</link><pubDate>Thu, 16 Aug 2012 10:51:40 +0000</pubDate><author>oli.sennhauser@fromdual.com (Oli Sennhauser)</author><guid>https://www.fromdual.com/blog/deadlocks-indexing-and-primary-keys/</guid><description>&lt;p>Recently a customer has shown up with some deadlocks occurring frequently. They were of the following type (I have shortened the output a bit):&lt;/p></description></item><item><title>Canias optimizations</title><link>https://www.fromdual.com/blog/canias-optimizations/</link><pubDate>Wed, 28 Dec 2011 16:02:23 +0000</pubDate><author>oli.sennhauser@fromdual.com (Oli Sennhauser)</author><guid>https://www.fromdual.com/blog/canias-optimizations/</guid><description>&lt;p>Canias is a great ERP product but there is still some potential to improve it. We only focus on MyISAM/InnoDB installations of Canias v6.0.2 in this article. For other DB back-ends those recommendations might be obsolete.&lt;/p></description></item><item><title>Disadvantages of explicitly NOT using InnoDB Primary Keys?</title><link>https://www.fromdual.com/blog/disadvantages-of-explicitly-not-using-innodb-primary-keys/</link><pubDate>Mon, 20 Sep 2010 15:36:36 +0000</pubDate><author>oli.sennhauser@fromdual.com (Oli Sennhauser)</author><guid>https://www.fromdual.com/blog/disadvantages-of-explicitly-not-using-innodb-primary-keys/</guid><description>&lt;p>We recently had the case with one of our customers where we got externally generated random hash values (up to 70 bytes) and they were used as Primary Keys in InnoDB.&lt;/p></description></item><item><title>MySQL hints</title><link>https://www.fromdual.com/blog/mysql-hints/</link><pubDate>Mon, 15 Mar 2010 13:38:54 +0000</pubDate><author>oli.sennhauser@fromdual.com (Oli Sennhauser)</author><guid>https://www.fromdual.com/blog/mysql-hints/</guid><description>&lt;h2 id="table-of-contents">Table of Contents&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="#temp_sequence">Result set with temporary sequence&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.fromdual.com/blog/mysql-hints/#prefixed_indexes">Determination of optimal length of prefixed indexes&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.fromdual.com/blog/mysql-hints/#ddl">Using MySQL keywords in table or columm names&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.fromdual.com/blog/mysql-hints/#missing_pk_index">Missing Primary Key Index&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.fromdual.com/blog/mysql-hints/#libaio">Problems while installing a MySQL 5.5 database&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.fromdual.com/blog/mysql-hints/#sequence">InnoDB AUTO_INCREMENT at 2&lt;sup>nd&lt;/sup> position&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;span id="temp_sequence">&lt;/span>&lt;/p></description></item><item><title>MariaDB and MySQL PERFORMANCE_SCHEMA Hints</title><link>https://www.fromdual.com/blog/mysql-performance-schema-hints/</link><pubDate>Sun, 14 Jul 2013 09:29:09 +0200</pubDate><author>oli.sennhauser@fromdual.com (Oli Sennhauser)</author><guid>https://www.fromdual.com/blog/mysql-performance-schema-hints/</guid><description>&lt;h2 id="table-of-contents">Table of Contents&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="#accounts-not-properly-closing">Accounts not properly closing connections&lt;/a>&lt;/li>
&lt;li>&lt;a href="#unused-indexes">Unused indexes&lt;/a>&lt;/li>
&lt;li>&lt;a href="#who-created-temporary-tables">Who created temporary (disk) tables&lt;/a>&lt;/li>
&lt;li>&lt;a href="#accounts-which-never-connected">Accounts which never connected since last start-up&lt;/a>&lt;/li>
&lt;li>&lt;a href="#user-which-never-connected">Users which never connected since last start-up&lt;/a>&lt;/li>
&lt;li>&lt;a href="#totally-unused-accounts">Totally unused accounts (never connected since last restart and not used to check Stored Program or View privileges) since last start-up&lt;/a>&lt;/li>
&lt;li>&lt;a href="#show-full-processlist">&lt;code>SHOW FULL PROCESSLIST&lt;/code>&lt;/a>&lt;/li>
&lt;li>&lt;a href="#storage-engine-per-schema">Storage Engines per schema&lt;/a>&lt;/li>
&lt;li>&lt;a href="#tables-without-primary-key">Tables without a Primary Key&lt;/a>&lt;/li>
&lt;li>&lt;a href="#bad-sql-queries-of-users">Bad SQL queries of users&lt;/a>&lt;/li>
&lt;li>&lt;a href="#show-profile-in-performance_schema">&lt;code>SHOW PROFILE&lt;/code> in &lt;code>PERFORMANCE_SCHEMA&lt;/code>&lt;/a>&lt;/li>
&lt;li>&lt;a href="#select-insert-update-and-delete-per-table">&lt;code>SELECT&lt;/code>, &lt;code>INSERT&lt;/code>, &lt;code>UPDATE&lt;/code> and &lt;code>DELETE&lt;/code> per table&lt;/a>&lt;/li>
&lt;li>&lt;a href="#top-long-running-queries">Top long running queries&lt;/a>&lt;/li>
&lt;li>&lt;a href="#tables-never-written-to">Tables never written to&lt;/a>&lt;/li>
&lt;li>&lt;a href="#dml-ddl-dcl-per-account">DML, DDL and DCL per account&lt;/a>&lt;/li>
&lt;li>&lt;a href="#erroneous-mysql-queries">Finding syntactically wrong/erroneous MySQL queries&lt;/a>&lt;/li>
&lt;li>&lt;a href="#finding-queries-served-by-query-cache">Finding queries served by MySQL Query Cache&lt;/a>&lt;/li>
&lt;li>&lt;a href="#grant-sys-schema-access">Grant access to &lt;code>sys&lt;/code> schema to another user&lt;/a>&lt;/li>
&lt;li>&lt;a href="#grant-ps-schema-access">Grant access to &lt;code>PERFORMANCE_SCHEMA&lt;/code> schema to another user&lt;/a>&lt;/li>
&lt;li>&lt;a href="#innodb-locks">Find InnoDB Locks&lt;/a>&lt;/li>
&lt;li>&lt;a href="#metadata-locks">Find Metadata Locks&lt;/a>&lt;/li>
&lt;li>&lt;a href="#statements-before-sleep">What did a Connection before sleeping?&lt;/a>&lt;/li>
&lt;li>&lt;a href="#how-many-statements-did-another-connection">How many statements did another (sleeping) connection?&lt;/a>&lt;/li>
&lt;li>&lt;a href="%22/blog/myisam-locking-and-who-is-the-evil#performance-schema%22" title="MyISAM locking and who is the evil?">MyISAM locking&lt;/a>&lt;/li>
&lt;li>&lt;a href="#connections-per-user">Connections per user&lt;/a>&lt;/li>
&lt;li>&lt;a href="#connections-per-user-and-ip">Connections per user and IP&lt;/a>&lt;/li>
&lt;li>&lt;a href="#accounts-which-could-not-connect">Accounts which could not connect or with connection errors&lt;/a>&lt;/li>
&lt;li>&lt;a href="#temporary-tables-filling-disk">Temporary tables filling my disk&lt;/a>&lt;/li>
&lt;li>&lt;a href="#who-is-writing-to-the-binary-log">Who is writing to the binary log&lt;/a>&lt;/li>
&lt;li>&lt;a href="#average-binlog-transaction-size">Average binlog transaction size&lt;/a>&lt;/li>
&lt;li>&lt;a href="#result-size-of-select-statement">Result size of &lt;code>SELECT&lt;/code> statement&lt;/a>&lt;/li>
&lt;li>&lt;a href="#find-open-long-running-transactions">Find open long running transactions&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="mariadb">MariaDB&lt;/h2>
&lt;p>On MariaDB you have to enable the Performance Schema first before use:&lt;/p></description></item></channel></rss>