The Bit Bucket

Database on a diet–final section (part 4)

Hi Folks,

I’ve been writing articles for SQL Server Magazine as part of my Data Tales series.

Over the last couple of months, I’ve been writing a min-series about a database on a diet.

Earlier parts described the need for size reduction, how ROW and PAGE compression come into play, how to choose between them, etc.

Part 4 (the final part) is now online here:

http://sqlmag.com/sql-server/data-tales-9-case-database-diet-part-4

It covers GZIP compression of large string fields, PDF size reduction in BLOBS, and more.

2016-08-12

SQL Server index updates vs PostgreSQL index updates

The link below is to quite a fascinating article that on the surface is about why Uber moved to MySQL from PostgreSQL.

What it really is about is a severe limitation in how PostgreSQL indexes are updated.

With SQL Server, if you update a few columns in a row, only the indexes that have that column are updated. In PostgreSQL, all indexes still need to be updated. I understand why they’ve done that but it’s not a good outcome.

2016-08-04

Happy Birthday Power BI from all of us

It’s hard to believe that it’s only a year, given how far Power BI has come.

Many of us in the community got together under the lead of Paul Turley and Adam Saxton and created a short video for Power BI’s birthday.

Looks good:

image

YouTube Video

2016-07-25

SQL Server 2016 Polybase Services stuck in Change Pending state

I’ve been using the Polybase services in SQL Server 2016 all throughout the pre-release period without any issue.

When I tried using them in the GA (Generally Availability) release, I could never get the two Polybase services to start. They were always stuck in a “Change Pending” state. Trying to start them in SQL Server Configuration Manager basically made SSCM look like it was hung.

Trying to use the Polybase services to create an external data source returned:

2016-07-06

Search for a String in all Tables of a Database

When I work in customer sites, there is a quite a difference between how different sites get data for testing. But it basically comes down to a variation of one of these five:

  • Testing? That’s for wimps. (Well perhaps for users)
  • I type in all the test data that I need.
  • We use a data generator to produce our test data.
  • We just periodically get a copy of production data.
  • We get production data and it gets masked before we can use it.

It’s the last option that I’m concerned with today. Masking data is challenging and usually much more difficult than imagined. This week, I was working with a masked database and we ended up finding all client details tucked inside a chunk of XML that was used to hold the metadata for a series of images. They had done a good job of removing it from all the normal columns from all tables in the database, but it’s so easy to miss extras like this.

2016-06-12

Auto-Injection of Enterprise Edition Features

There’s an interesting scenario that’s come up in creating some new samples for SQL Server 2016.

I know that for many, many years people have asked for a way to limit developer edition to only use standard edition features, or at least to have a way to flag them. I’ve often thought that I’d like a way to set a “target environment” and have the colorization change anything that I can’t use in standard to an obviously different color.

2016-06-03

Should my database have foreign key constraints?

There is an endless discussion in the development community about whether databases should include declared foreign key constraints or not.

As a consultant, I regularly visit a wide variety of client sites. Many of these have applications designed without constraints. When I ask why there are no constraints, the response is invariably one of the following:

  • The app ensures that it’s right
  • They don’t work well with our application development
  • They are too slow
  • What’s a foreign key constraint?

Most of the sites that I work with have sizeable databases. This discussion is important in those situations.

2016-05-31

Data Tales 8: Database on a Diet (Part 3)

Hi Folks,

My series of articles for SQL Server Magazine continues. Last time, I continued a short series about a large database that needed to go on a diet. Last time, I look at the internals of row and page compression, to see what happens when they are used. We saw the significant differences in how ROW and PAGE compression are implemented. So how do you decide what to use?

2016-05-18