Remove sql-while-loop-with-simple-examples
article thumbnail

Using JSONB in PostgreSQL: How to Effectively Store & Index JSON Data in PostgreSQL

Scalegrid

SQL/JSON & JSONPath. If you store each of the keys as columns, it will result in frequent DML operations – this can be difficult when your data set is large - for example, event tracking, analytics, tags, etc. For example, Stripe transactions. What’s in this article? Why Store JSON in PostgreSQL? JSONB Indexes.

Storage 321
article thumbnail

Emulating the GROUPS Window Frame Option

SQL Performance

The same goes specifically for handling T-SQL querying tasks in terms of supported language elements. T-SQL, the dialect, supports a subset of the features from standard SQL. This could also happen if you need to migrate code written for another database platform with a different dialect of SQL to T-SQL.

C++ 112
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

Matching Supply With Demand Challenge

SQL Performance

My friend Peter Larsson sent me a T-SQL challenge involving matching supply with demand. It's a pretty common need in real life; it's simple to describe, and it's quite easy to solve with reasonable performance using a cursor-based solution. As far as challenges go, it's a formidable one. Auctions ; SET IDENTITY_INSERT dbo.

C++ 133
article thumbnail

HammerDB CLI 101

HammerDB

In this example we are using SQL Server so the message shows that everything is in order and we can proceed with running tests. In the example below we have modified the SQL Server, number of warehouses to build and the virtual users to build them. The example below shows the same settings made in the GUI.

article thumbnail

The SQL Server Transaction Log, Part 3: Logging Basics

SQL Performance

When all is well, the transaction log will endlessly loop, reusing the existing VLFs. A VLF will remain active while required log records are in it, so it can’t be reused and overwritten (I’ll cover log records themselves next time). Our example scenario is shown in Figure 1 below.

Servers 55
article thumbnail

What programming languages does HammerDB use and why does it matter?

HammerDB

Firstly, for a database benchmarking application it should not come as a huge surprise that the key language used for testing databases is Structured Query Language known as SQL. For HammerDB both TPROC-C and TPROC-H run all of their workloads on the database being tested in SQL. So the interaction with the database is in SQL.

article thumbnail

Fundamentals of table expressions, Part 8 – CTEs, optimization considerations continued

SQL Performance

In my examples I’ll continue using the sample database TSQLV5. DECLARE @i AS INT = 1 ; WHILE @@ROWCOUNT = 1. DECLARE @i AS INT = 1 ; WHILE @@ROWCOUNT = 1. DECLARE @i AS INT = 1 ; WHILE @@ROWCOUNT = 1. Consequently, Batch 2 has an infinite loop. Multiple references and nondeterminism.

C++ 122