One of the biggest and undead myths in SQL is that COUNT(*) is faster than COUNT(1). Or was it that COUNT(1) is faster than COUNT(*)? Impossible to remember, because there's really no reason at all why one should be faster than the other. But is the myth justified? Let's measure! How does COUNT(...) work? But … Continue reading What’s Faster? COUNT(*) or COUNT(1)? →
Introduction In this article, we are going to see how we can limit the SQL query result set to the Top-N rows only. Limiting the SQL result set is very important when the underlying query could end up fetching a very large number of records, which can have a significant impact on application performance. Why limit the number of rows of a SQL query? Fetching more data than necessary is the number one cause of data access performance issues. When a given business use case is developed, the amount of data available... Read More
The post How to limit the SQL query result set to Top-N rows only appeared first on Vlad Mihalcea.
Introduction In this article, we are going to see how we can sort an SQL query result set using an ORDER BY clause that takes a RANDOM function provided by a database-specific function. This is a very handy trick, especially when you want to shuffle a given result set. Note that sorting a large result set using a RANDOM function might turn out to be very slow, so make sure you do that on small result sets. If you have to shuffle a large result set and limit it afterward, then it’s... Read More
The post SQL ORDER BY RANDOM appeared first on Vlad Mihalcea.
Ready to transition from a commercial database to open source, and want to know which databases are most popular in 2019? Wondering whether an on-premise vs. public cloud vs. hybrid cloud infrastructure is best for your database strategy? Or, considering adding a new database to your application and want to see which combinations are most popular? We found all the answers you need at the Percona Live event last month, and broke down the insights into the following free trends reports:
- Top Databases Used: Open Source vs. Commercial
- Cloud Infrastructure Analysis: Public Cloud vs. On-Premise vs. Hybrid Cloud
- Polyglot Persistence Trends: …
I have been managing multiple databases, mostly in Microsoft SQL
Server and MySQL server, both on on-premise and cloud. We have
faced a lot of challenging issues such as records deleted from a
user table, backup file is corrupted, backup file is not
compatible, backup files got deleted, backup storage is full and
backup is running for long time, etc. When you are facing this
issues for the first time, it is surprising to see new kind of
issues every day and if you are not good in documentation,
repetitive issues will keep occurring and we keep fixing rather
than suctioning. If you are facing same challenges, then you need
to focus on your backup and recovery strategy.
A well-designed backup and recovery strategy maximizes data
availability and minimizes data loss without tolerating business
requirement. In this post, we will discuss about the following
topics:
- Recovery Time Objective (RTO) …
The tutorial guides you through MySQL Database connectivity with
Entity Framework
We are facing entity framework database provider compatible with
version could not be found for your data connection issue
while connecting with MySQL 5.7 and 8.0. Problem
with MySql.Data.Entity.EF6.dll missing and not able to
connect with Entity framework
As per my requirements, the customer wants to migrate MSSQL to
MySQL server. So I want to use any version of MySQL,
installed with below configurations and achieve the
connectivity 1.MySQL Server : 5.6.41
2.MySQL Connector/Net : 6.9.12
3.Entity Framework : 6.2.0
4.Visual Studio : Professional 2017 Configuration steps are
below,
1. Download required versions,
MySQL
- https://dev.mysql.com/downloads/windows/installer/5.7.html
Visual Studio
- https://visualstudio.microsoft.com/downloads/
2. Once downloaded, …
Introduction Ever wanted to connect to a relational database using Java and didn’t know the URL connection string? Then, this article is surely going to help you from now on. Oracle The JDBC connection properties look as follows: JDBC Driver oracle.jdbc.OracleDriver JDBC Url jdbc:oracle:thin:@localhost:1521/orclpdb1 Hibernate Dialect org.hibernate.dialect.Oracle12cDialect And, if you want to connect using a … Continue reading JDBC Driver Connection URL strings →
The post JDBC Driver Connection URL strings appeared first on Vlad Mihalcea.
This edition of Log Buffer covers Cloud, Oracle, SQL Server and MySQL and much more.
Cloud:
Introducing managed SSL for Google App Engine
Using Cloud Foundry CUPS to inject Spring Security credentials into a Spring Boot Application
ClusterControl in the Cloud – All Our Resources
Monitoring Amazon Aurora Audit Events with Amazon CloudWatch
Integrating Teradata with Amazon …
[Read more]The SQL language has one great advantage over procedural, object oriented, and "ordinary" functional programming languages. The fact that it is truly declarative (i.e. a 4GL / fourth generation programming language) means that a sophisticated optimiser can easily transform one SQL expression into another, equivalent SQL expression, which might be faster to execute. How does … Continue reading JOIN Elimination: An Essential Optimiser Feature for Advanced SQL Usage →
This Log Buffer Edition covers Oracle, SQL Server and MySQL.
Oracle:
You may wish to clone an Oracle Home (for example you have all your databases on a single Oracle Home, but you want to separate Development from Test
Removing Outliers using stddev()
Installing Scala and Apache Spark on a Mac
Introduction to Oracle Big Data Cloud Service – Compute Edition (Part V) – Pig
More on …
[Read more]