Przemysław Malkowski, Author at Percona Database Performance Blog Mon, 15 Apr 2024 13:02:26 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 https://www.percona.com/blog/wp-content/uploads/2023/02/cropped-percona-favicon-32x32.png Przemysław Malkowski, Author at Percona Database Performance Blog 32 32 76301791 Why SELECT COUNT(*) FROM TABLE Is Sometimes Very Slow in MySQL or MariaDB https://www.percona.com/blog/why-select-count-from-table-is-sometimes-very-slow-in-mysql-or-mariadb/ https://www.percona.com/blog/why-select-count-from-table-is-sometimes-very-slow-in-mysql-or-mariadb/#comments Mon, 15 Apr 2024 13:02:26 +0000 https://www.percona.com/blog/?p=95505 If you have enough experience with MySQL, it is very possible that you stumbled upon an unusually slow SELECT COUNT(*) FROM TABLE; query execution, at least occasionally.Recently, I had a chance to investigate some of these cases closer, and it stunned me what huge differences there can be depending on the circumstance given the very […]]]> https://www.percona.com/blog/why-select-count-from-table-is-sometimes-very-slow-in-mysql-or-mariadb/feed/ 1 95505 Can Disk Space Be Saved in MySQL by Adding a Primary Key? https://www.percona.com/blog/can-disk-space-be-saved-in-mysql-by-adding-a-primary-key/ https://www.percona.com/blog/can-disk-space-be-saved-in-mysql-by-adding-a-primary-key/#respond Fri, 09 Feb 2024 14:07:25 +0000 https://www.percona.com/blog/?p=94355 Historically, MySQL does not require explicit primary key defined on tables, and it’s like that by default till this day (MySQL version 8.3.0). Such a requirement is imposed through two replication methods, though: Group Replication and Percona XtraDB Cluster (PXC), where using tables without a primary key is not allowed by default. There are many […]]]> https://www.percona.com/blog/can-disk-space-be-saved-in-mysql-by-adding-a-primary-key/feed/ 0 94355 MySQL Table Size Is Way Bigger After Adding a Simple Index; Why? https://www.percona.com/blog/mysql-table-size-is-way-bigger-after-adding-a-simple-index-why/ https://www.percona.com/blog/mysql-table-size-is-way-bigger-after-adding-a-simple-index-why/#respond Wed, 31 Jan 2024 14:00:03 +0000 https://www.percona.com/blog/?p=93688 It is a known good practice to keep only necessary indexes to reduce the write performance and disk space overhead. This simple rule is mentioned briefly in the official MySQL Documentation:https://dev.mysql.com/doc/refman/8.0/en/optimization-indexes.htmlHowever, in some cases, the overhead from adding a new index can be way above the expectations! Recently, I’ve been analyzing a customer case like […]]]> https://www.percona.com/blog/mysql-table-size-is-way-bigger-after-adding-a-simple-index-why/feed/ 0 93688 Can You Trust AI Chatbots When Seeking Help With Databases? https://www.percona.com/blog/can-you-trust-ai-chatbots-when-seeking-help-with-databases/ https://www.percona.com/blog/can-you-trust-ai-chatbots-when-seeking-help-with-databases/#respond Thu, 14 Dec 2023 15:06:20 +0000 https://www.percona.com/blog/?p=92580 Will 2023 be called the year of Generative Artificial Intelligence (AI)? I don’t know, but certainly, the launching of ChatGPT at the end of 2022 sparked a huge hype explosion around that technology throughout this year. Interesting time indeed, we’re eyewitnesses to something that started changing our world.I played a bit with ChatGPT in February […]]]> https://www.percona.com/blog/can-you-trust-ai-chatbots-when-seeking-help-with-databases/feed/ 0 92580 Is ANALYZE TABLE Safe on a Busy MySQL Database Server? https://www.percona.com/blog/is-analyze-table-safe-on-a-busy-mysql-database-server/ https://www.percona.com/blog/is-analyze-table-safe-on-a-busy-mysql-database-server/#respond Wed, 01 Nov 2023 13:12:35 +0000 https://www.percona.com/blog/?p=91756 Sometimes, there is a need to update the table and index statistics manually using the ANALYZE TABLE command. Without going further into the reasons for such a need, I wanted to refresh this subject in terms of overhead related to running the command on production systems. However, the overhead discussed here is unrelated to the […]]]> https://www.percona.com/blog/is-analyze-table-safe-on-a-busy-mysql-database-server/feed/ 0 91756 MongoDB Queries Slow Due to Flow Control but No Replication Lag? https://www.percona.com/blog/mongodb-queries-slow-due-to-flow-control-but-no-replication-lag/ https://www.percona.com/blog/mongodb-queries-slow-due-to-flow-control-but-no-replication-lag/#respond Thu, 12 Oct 2023 12:01:05 +0000 https://www.percona.com/blog/?p=91411 Have you ever encountered queries delayed by flow control but found no lagged secondaries? This article shows a possible scenario of why this happens.Replica Sets provide high availability and redundancy to MongoDB clusters. There is always one primary node that can accept writes, but the replica set topologies vary depending on the use case and […]]]> https://www.percona.com/blog/mongodb-queries-slow-due-to-flow-control-but-no-replication-lag/feed/ 0 91411 Upgrade MySQL to 8.0? Yes, but Avoid Disaster! https://www.percona.com/blog/upgrade-mysql-to-8-0-yes-but-avoid-disaster/ https://www.percona.com/blog/upgrade-mysql-to-8-0-yes-but-avoid-disaster/#comments Wed, 05 Jul 2023 11:56:38 +0000 https://www.percona.com/blog/?p=89221 Upgrading to MySQL version 8.0 is a hot topic since version 5.7 is approaching the official end of life very soon. MySQL 5.7 EOL is set for the end of October 2023.If you feel unprepared for the upgrade, consider post-EOL support from Percona. But it would be the worst if you proceeded with the upgrade […]]]> https://www.percona.com/blog/upgrade-mysql-to-8-0-yes-but-avoid-disaster/feed/ 2 89221 Streaming MongoDB Backups Directly to S3 https://www.percona.com/blog/streaming-mongodb-backups-directly-to-s3/ https://www.percona.com/blog/streaming-mongodb-backups-directly-to-s3/#comments Thu, 23 Feb 2023 13:11:32 +0000 https://www.percona.com/blog/?p=85523 If you ever had to make a quick ad-hoc backup of your MongoDB databases, but there was not enough disk space on the local disk to do so, this blog post may provide some handy tips to save you from headaches.It is a common practice that before a backup can be stored in the cloud […]]]> https://www.percona.com/blog/streaming-mongodb-backups-directly-to-s3/feed/ 1 85523 Is MySQL Statement-Based / Mixed Replication Really Safe? https://www.percona.com/blog/is-mysql-statement-based-mixed-replication-really-safe/ https://www.percona.com/blog/is-mysql-statement-based-mixed-replication-really-safe/#comments Thu, 26 May 2022 13:40:28 +0000 https://www.percona.com/blog/?p=81099 The binary logging format in MySQL has been ROW by default since MySQL 5.7, yet there are still many users sticking with STATEMENT or MIXED formats for various reasons. In some cases, there is just simple hesitation from changing something that has worked for years on legacy applications. But in others, there may be serious […]]]> https://www.percona.com/blog/is-mysql-statement-based-mixed-replication-really-safe/feed/ 2 81099 Hidden Cost of Foreign Key Constraints in MySQL https://www.percona.com/blog/hidden-cost-of-foreign-key-constraints-in-mysql/ https://www.percona.com/blog/hidden-cost-of-foreign-key-constraints-in-mysql/#respond Tue, 05 Apr 2022 12:13:21 +0000 https://www.percona.com/blog/?p=80567 Do you wonder if MySQL tells you the truth about writes to tables that have foreign key constraints? The situation is complex, and getting visibility on what is really happening can be a problem.I found this issue intriguing and decided to share and highlight some examples.Query PlanLet us take this example table: [crayon-664c78320ba3c033587576/] We want […]]]> https://www.percona.com/blog/hidden-cost-of-foreign-key-constraints-in-mysql/feed/ 0 80567 Optimize SST in Percona XtraDB Cluster with ZSTD Compression https://www.percona.com/blog/optimize-sst-in-percona-xtradb-cluster-with-zstd-compression/ https://www.percona.com/blog/optimize-sst-in-percona-xtradb-cluster-with-zstd-compression/#comments Thu, 03 Feb 2022 13:23:22 +0000 https://www.percona.com/blog/?p=79994 Percona XtraDB Cluster (PXC) offers a great deal of flexibility when it comes to the state transfer (SST) options (used when a new node is automatically provisioned with data). For many environments, on-the-fly compression capability gives great benefits of saving network bandwidth during the process of sending sometimes terabytes of data. The usual choice for […]]]> https://www.percona.com/blog/optimize-sst-in-percona-xtradb-cluster-with-zstd-compression/feed/ 2 79994 Temporary Tables in MySQL – Never Ending Story? https://www.percona.com/blog/temporary-tables-in-mysql-never-ending-story/ https://www.percona.com/blog/temporary-tables-in-mysql-never-ending-story/#comments Mon, 22 Nov 2021 15:02:36 +0000 https://www.percona.com/blog/?p=79060 If you ever had to deal with performance and/or disk space issues related to temporary tables, I bet you eventually found yourself puzzled. There are many possible scenarios depending on the type of temporary table, settings, and MySQL version used. We have observed a pretty long evolution in that matter due to a couple of […]]]> https://www.percona.com/blog/temporary-tables-in-mysql-never-ending-story/feed/ 3 79060 How To Recover Percona XtraDB Cluster 5.7 Node Without SST https://www.percona.com/blog/how-to-recover-percona-xtradb-cluster-5-7-node-without-sst/ https://www.percona.com/blog/how-to-recover-percona-xtradb-cluster-5-7-node-without-sst/#comments Mon, 12 Jul 2021 12:47:13 +0000 https://www.percona.com/blog/?p=77286 The ProblemState Snapshot Transfer can be a very long and expensive process, depending on the size of your Percona XtraDB Cluster (PXC)/Galera cluster, as well as network and disk bandwidth. There are situations where it is needed though, like after long enough node separation, where the gcache on other members was too small to keep […]]]> https://www.percona.com/blog/how-to-recover-percona-xtradb-cluster-5-7-node-without-sst/feed/ 4 77286 Resolving the MySQL Active-Active Replication Dilemma https://www.percona.com/blog/resolving-the-mysql-active-active-replication-dilemma/ https://www.percona.com/blog/resolving-the-mysql-active-active-replication-dilemma/#comments Wed, 28 Apr 2021 17:42:20 +0000 https://www.percona.com/blog/?p=75666 Multi-writer replication has been a challenge in the MySQL ecosystem for years before truly dedicated solutions were introduced – first Galera (and so Percona XtradDB Cluster (PXC)) replication (around 2011), and then Group Replication (first GA in 2016).Now, with both multi-writer technologies available, do we still need traditional asynchronous replication, set up in active-active topology? […]]]> https://www.percona.com/blog/resolving-the-mysql-active-active-replication-dilemma/feed/ 7 75666 How to Store MySQL Audit Logs in MongoDB in a Maintenance-Free Setup https://www.percona.com/blog/how-to-store-mysql-audit-logs-in-mongodb-in-a-maintenance-free-setup/ https://www.percona.com/blog/how-to-store-mysql-audit-logs-in-mongodb-in-a-maintenance-free-setup/#comments Thu, 14 Jan 2021 20:17:15 +0000 https://www.percona.com/blog/?p=73560 I was once helping one of our customers on how to load MySQL audit logs into a MySQL database and analyze them. But immediately I thought: “Hey, this is not the most efficient solution! MySQL or typical RDBMS, in general, were not really meant to store logs after all.”So, I decided to explore an alternative […]]]> https://www.percona.com/blog/how-to-store-mysql-audit-logs-in-mongodb-in-a-maintenance-free-setup/feed/ 2 73560 Dangerous Edge Case Warning for Percona Toolkit and pt-online-schema-change https://www.percona.com/blog/dangerous-edge-case-warning-for-percona-toolkit-and-pt-online-schema-change/ Thu, 08 Oct 2020 13:40:07 +0000 https://www.percona.com/blog/?p=71620 Recently I was dealing with an unexpected issue raised by our Support customer, in which data became inconsistent after a schema change was applied.After some investigation, it turned out that affected tables had a special word in the comments of some columns, which triggered an already known (and fixed) issue with the TableParser.pm library of […]]]> 71620 Percona Server for MySQL Highlights – Extended Slow Query Logging https://www.percona.com/blog/percona-server-for-mysql-highlights-extended-slow-query-logging/ Mon, 29 Jun 2020 18:59:31 +0000 https://www.percona.com/blog/?p=66385 Last year, I made the first post in a small series, which aimed to highlight unique features of Percona Server for MySQL, by discussing binlog_space_limit option.Today, I am going to discuss another important type of log available in MySQL that is enhanced in Percona Server for MySQL – the slow query log. The reason why […]]]> 66385 Percona Server for MySQL Highlights – binlog_space_limit https://www.percona.com/blog/percona-server-for-mysql-highlights-binlog_space_limit/ https://www.percona.com/blog/percona-server-for-mysql-highlights-binlog_space_limit/#comments Wed, 03 Jul 2019 14:19:00 +0000 https://www.percona.com/blog/?p=57460 I think it is often confusing to compare upstream MySQL and Percona Server for MySQL, and some helpful information can be found in the introductory notes. But what does that really mean for an ordinary DBA, especially if none of the known big extra features are important in a particular use case?In this article, I […]]]> https://www.percona.com/blog/percona-server-for-mysql-highlights-binlog_space_limit/feed/ 3 57460 How to Perform Compatible Schema Changes in Percona XtraDB Cluster (Advanced Alternative)? https://www.percona.com/blog/how-to-perform-compatible-schema-changes-in-percona-xtradb-cluster-advanced-alternative/ https://www.percona.com/blog/how-to-perform-compatible-schema-changes-in-percona-xtradb-cluster-advanced-alternative/#comments Mon, 25 Mar 2019 12:37:36 +0000 https://www.percona.com/blog/?p=54113 If you are using Galera replication, you know that schema changes may be a serious problem. With its current implementation, there is no way even a simple ALTER will be unobtrusive for live production traffic. It is a fact that with the default TOI alter method, Percona XtraDB Cluster (PXC) cluster suspends writes in order […]]]> https://www.percona.com/blog/how-to-perform-compatible-schema-changes-in-percona-xtradb-cluster-advanced-alternative/feed/ 2 54113 How to Quickly Add a Node to an InnoDB Cluster or Group Replication https://www.percona.com/blog/how-to-quickly-add-a-node-to-an-innodb-cluster-or-group-replication/ https://www.percona.com/blog/how-to-quickly-add-a-node-to-an-innodb-cluster-or-group-replication/#comments Mon, 05 Nov 2018 19:46:42 +0000 https://www.percona.com/blog/?p=53438 In this blog, we’ll look at how to quickly add a node to an InnoDB Cluster or Group Replication using Percona XtraBackup.Adding nodes to a Group Replication cluster can be easy (documented here), but it only works if the existing nodes have retained all the binary logs since the creation of the cluster. Obviously, this […]]]> https://www.percona.com/blog/how-to-quickly-add-a-node-to-an-innodb-cluster-or-group-replication/feed/ 3 53438