Released PostgreSQL 9.5: UPSERT, RLS and Big Data



/ > Today the PostgreSQL Global Development Group announced the launch PostgreSQL 9.5. Among other innovations can be noted the function UPSERT, security, row-level (Row Level Security, RLS) and a few functions work with Big Data. According to the developers, the new features make PostgreSQL a better option among all possible for startups, large corporations and government organisations.

Learn more about the new features under the cut.

the

UPSERT


The most popular function among application developers, UPSERT is short for "INSERT ON CONFLICT UPDATE". New feature allows to handle a situation of inability to add data through INSERT, for example, due to violations of the conditions of the uniqueness or inadmissibility of the value of one of the fields, and instead of the error output to ignore the execution of a statement or to change key field data (i.e. if the entry already exists, instead of INSERT to perform the UPDATE).

According to representatives of the team, UPSERT simplifies the development of web and mobile applications. The condition ON CONFLICT allows us to ignore new data or update the various columns or communications so that the company supported ETL (Extract, Transform, Load) sets of compilers to download the datasets. A new feature is fully compatible with all other features of PostgreSQL, including Replication Logical.

the

Row-Level Security (RLS)


This feature is the result of work for a period of five years. RLS provides the ability to create security policies that restrict user access to information in the database. Security policies allow either "close" information, fully or partially, or to allow performance of certain actions with the information.

the

Big Data


Here the developers have added several new features, including a Block Range Indexes (BRIN), which provides a faster search for certain types of data. On the search for such data, according to representatives of the team will leave only 5% of the time required to search a B-tree.

BRIN-indices. This new type of index allows you to create a tiny but efficient indexes for very large tables, the data in which the "naturally ordered". For example, tables containing data of system logs with billions of rows can be indexed and scanned for only 5% of the time it takes for a standard BTree indexes.

Express sorting. Now PostgreSQL sorts textual data and the data of NUMERIC type faster using the algorithm "abbreviated keys". This speeds up some queries that require sorting large amounts of data, from 2 to 12 times and can speed up the index creation is up to 20 times.
CUBE, ROLLUP, and GROUPING SETS. These new proposals the standard SQL language allows users to create reports with multiple levels of summarizing in a single query. Offer CUBE also allows you to closely integrate PostgreSQL with a large number of tools to create OLAP-reports (Online Analytic Processing) — such as Tableau.

PostgreSQL's foreign data (Foreign Data Wrappers, FDW). This functionality previously enabled to use PostgreSQL as the environment for requests to other "Big Data"systems like Hadoop and Cassandra. In version 9.5 added IMPORT FOREIGN SCHEMA and JOIN-displacement (JOIN pushdown), making queries to external databases as easier to install and more effective.

TABLESAMPLE. This SQL offer allows you to quickly get a statistical sampling for a huge table without the need for resource-intensive sorting.

Overall, the 9.5 release a lot of new, really useful for developers. It should be remembered that when upgrading some old DB may have problems, this is worth remembering.

More detailed information about the innovations in version 9.5 (Wiki developers) available here or here (Russian press release).
Article based on information from habrahabr.ru

Популярные сообщения из этого блога

Approval of WSUS updates: import, export, copy

Kaspersky Security Center — the fight for automation

The Hilbert curve vs. Z-order