we'll take a look at SQL Server on Linux.
I'll show you how you can download and
install SQL Server on a Linux virtual machine.
Run your SQL Server based apps inside of
Docker Containers.And improve the performance of your applications with
Columnstore,one of the many powerful features in SQL Server.
In March of this year, we announced that we
are bringing SQL Server to Linux.
Today we're announcing that SQL Server on
Linux is available in public preview.
The first thing I want to show you is how
easy it isto download and install on Linux in under 60 seconds.
Here on my Macbook, I'm running a red hat
enterprise Linux VMTo kick off the installation, I run Yum install
mssql-server.
While that's installing, I'd like to tell you
a little bit more about SQL Server on Linux.
The scope of the first SQL Server release on
Linux is the relational database only.
Most of the key features of SQL Server 2016
will be included,such as Transparent data encryption,
Always encrypted, Row level security,In
memory tables, Columnstore and more.
Looks like the installation completed.So now
you can see that we can install SQL Server on Linux in under a minute.That'show
easy it is to get installed on your own VM.
But you can also just grab a Docker image
with SQL Server pre-installed.
Let's take a look at an example of a Docker
based application
with SQL Server container.Let's first look at
the application architecture.
First we have a voting application
which is a python-based application that
registers a user's vote for either dogs or cats.
The vote is stored in the Redis cache DB.
And then a java worker app container
move the vote from the Redis cache DB to the
SQL Server database.
And then a node-based application
displays the results to the user.
Now let's go back and Docker compose up our
application.
Now that the application is up
we can bring up the voting application
and the results.
Let's go ahead and vote for dogs.
That will register the vote in the database
and we can see the results.
Now lets take a look inside of the database
and see what's happening.
To do that, I'll run a command in the command
palette
to connect to a SQL Server database.
I've already pre casched a connection to my
votes database
running my SQL Server container.
We can see that we are now connected down
here in the lower right hand corner
and we can begin executing queries.
So here we can see that we have a vote for
dogs which is B.
and we can update the vote to A.
And see that the vote has now changed from
dogs to cats.
So you can see from this basic example that
SQL Server operates just like any other SQL Server.
Even when it runs inside of a Docker
container.
Now let me finish up by showing you one of
the many powerful capabilities of SQL Server.
Columnstores stores data on disk and in
memory
in a special order for fast access and better
compression rates.
I'll run this simple job application.
And while it's running, i'll explain what it
does.
First, it connects to SQL Server.
Then it drops a database if it already exists
and recreate a new empty database for us to
insert data into.
Then it has a simple data generation routine
which inserts data into a products table
and has a price column that stores the price
of objects.
In this case, we're inserting five million
rows worth of data.
After the data is inserted, we'll run a
typical select sum query
to sum up the price of all of the five
million rows.
Then we'll create the clustered columnstore
index to improve performance.
And we'll rerun the query to see the
improvement in performance.
So at this point, we're inserting the five
million rows into the table.
Now that the data has been inserted
we can see that the first query took 382
milliseconds to run
Now we'll add a Clustered Columnstore index
to the table to improve performance.
After the Clustered Columnstore index is
added,
the query time is only seven milliseconds
So we can see that we got fifty times better
performance
just on my Macbook and with only five million
rows.
All I had to do was run a one-line T-SQL
query to add the index.
The best part is that we just announced that
all the programmability features
previously available in enterprise edition
are now available in all editions of SQL
Server.
Both on Linux and on SQL Server 2016 FP1 on
Windows
which we also just released today.
Hopefully this gives you a quick idea of how
seamlessly SQL Server
fits into Linux and Docker.
It's SQL Server as you know it today, it's
just native to Linux.
It works with your data and your favorite
tools, application, frameworks and programming languages.
It's even easy to get.
So go grab the public preview at the link
below.
We're looking forward to hearing your
feedback
and answering your questions over on Stack
Overflow.