{"id":12480,"date":"2019-06-02T13:20:42","date_gmt":"2019-06-02T11:20:42","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/"},"modified":"2019-06-02T13:20:42","modified_gmt":"2019-06-02T11:20:42","slug":"postgresql-partitioning-1-preparing-the-data-set","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/","title":{"rendered":"PostgreSQL partitioning (1): Preparing the data set"},"content":{"rendered":"<p>This is the start of a series about partitioning in PostgreSQL. For this and the following posts I will use PostgreSQL 12 (which currently is in beta) so some stuff might not work if you are on PostgreSQL 11 or even on PostgreSQL 10 when declarative partitioning was introduced. This very first post is only about preparing the data set and I decided to separate this one from the next post because it shows various things around loading data in PostgreSQL and therefore might be useful on its one.<\/p>\n<p><!--more--><\/p>\n<p>When you are looking for free data sets <a href=\"https:\/\/www.data.gov\/\" target=\"_blank\" rel=\"noopener noreferrer\">&#8220;The home of the U.S. Government\u2019s open data&#8221;<\/a> is a great source. It provides free data sets for research, development or just data you can play with for whatever reason. For the scope of this and the following posts we will use the <a href=\"https:\/\/catalog.data.gov\/dataset\/traffic-violations-56dda\" target=\"_blank\" rel=\"noopener noreferrer\">Traffic violations<\/a> data set. It contains more the 1.5 millions of rows and is a good starting point for diving into PostgreSQL partitioning.<\/p>\n<p>The initial import goes into a table which only contains text columns and from there we can load our partitions later on. The structure of the table is: <\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\ncreate table traffic_violations\n( seqid text\n, date_of_stop text\n, time_of_stop text\n, agency text\n, subagency text\n, description text\n, location text\n, latitude text\n, longitude text \n, accident text\n, belts text\n, personal_injury text\n, property_damage text\n, fatal text\n, commercial_license text\n, hazmat text\n, commercial_vehicle text\n, alcohol text\n, workzone text\n, state text\n, vehicletype text\n, year text\n, make text\n, model text\n, color text\n, violation_type text\n, charge text\n, article text\n, contributed_to_accident text\n, race text\n, gender text\n, driver_city text\n, driver_state text\n, dl_state text\n, arrest_type text\n, geolocation text\n, council_districts text\n, councils text\n, communities text\n, zip_codes text\n, municipalities text\n);\n<\/pre>\n<p>For loading the table the easiest way is to use PostgreSQL&#8217;s <a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-copy.html\" target=\"_blank\" rel=\"noopener noreferrer\">copy<\/a> command:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\npostgres=# ! ls -l Traffic_Violations.csv\n-rw-rw-r--. 1 postgres postgres 634161687 May 28 11:28 Traffic_Violations.csv\npostgres=# copy traffic_violations from '\/home\/postgres\/Traffic_Violations.csv' with ( format csv, header true, null 'null', delimiter ',');\nCOPY 1528078\n<\/pre>\n<p>So we have around 1.5 millions of rows with real data. As this table contains only text columns we will create a <a href=\"https:\/\/www.postgresql.org\/docs\/current\/rules-materializedviews.html\" target=\"_blank\" rel=\"noopener noreferrer\">materialized view<\/a> with data types that fit the data. Looking at one row of the table:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\npostgres=# x\nExpanded display is on.\npostgres=# select * from traffic_violations limit 1;\n-[ RECORD 1 ]-----------+-------------------------------------------------------------------------\nseqid                   | e13d2082-55a7-4a93-8836-173be19d2648\ndate_of_stop            | 06\/01\/2019\ntime_of_stop            | 13:38:00\nagency                  | MCP\nsubagency               | 2nd District, Bethesda\ndescription             | DRIVER FAILURE TO YIELD RIGHT-OF-WAY TO VEH. UPON EMERGING FROM DRIVEWAY\nlocation                | RANDOLPH RD \/ NEW HAMPSHIRE\nlatitude                | 39.07592\nlongitude               | -77.0011316666667\naccident                | Yes\nbelts                   | No\npersonal_injury         | No\nproperty_damage         | Yes\nfatal                   | No\ncommercial_license      | No\nhazmat                  | No\ncommercial_vehicle      | No\nalcohol                 | No\nworkzone                | No\nstate                   | MD\nvehicletype             | 02 - Automobile\nyear                    | 2014\nmake                    | HYUN\nmodel                   | TK\ncolor                   | SILVER\nviolation_type          | Warning\ncharge                  | 21-705(c)\narticle                 | Transportation Article\ncontributed_to_accident | false\nrace                    | WHITE\ngender                  | F\ndriver_city             | SILVER SPRING\ndriver_state            | MD\ndl_state                | MD\narrest_type             | A - Marked Patrol\ngeolocation             | (39.07592, -77.0011316666667)\ncouncil_districts       | 5\ncouncils                | 5\ncommunities             | 26\nzip_codes               | 12\nmunicipalities          | 1\n<\/pre>\n<p>The materialized view becomes:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\ncreate materialized view mv_traffic_violations\n( seqid \n, date_of_stop  \n, time_of_stop \n, agency  \n, subagency  \n, description \n, location \n, latitude \n, longitude \n, accident \n, belts \n, personal_injury \n, property_damage \n, fatal \n, commercial_license \n, hazmat \n, commercial_vehicle \n, alcohol \n, workzone \n, state \n, vehicletype \n, year \n, make \n, model \n, color \n, violation_type \n, charge \n, article \n, contributed_to_accident \n, race \n, gender \n, driver_city \n, driver_state \n, dl_state \n, arrest_type \n, geolocation \n, council_districts \n, councils \n, communities \n, zip_codes \n, municipalities \n)\nas\nselect seqid\n     , to_date(date_of_stop,'MM\/DD\/YYYY')\n     , time_of_stop::time\n     , agency\n     , subagency \n     , description\n     , location\n     , latitude::numeric\n     , longitude::numeric\n     , accident\n     , belts::boolean\n     , personal_injury::boolean\n     , property_damage::boolean\n     , fatal::boolean\n     , commercial_license::boolean\n     , hazmat::boolean\n     , commercial_vehicle::boolean\n     , alcohol::boolean\n     , workzone::boolean\n     , state\n     , vehicletype\n     , case year\n         when '' then null\n         else year::smallint\n       end\n     , make\n     , model\n     , color\n     , violation_type\n     , charge\n     , article\n     , contributed_to_accident::boolean\n     , race\n     , gender\n     , driver_city\n     , driver_state\n     , dl_state\n     , arrest_type\n     , geolocation::point\n     , case council_districts\n         when '' then null\n         else council_districts::smallint\n       end\n     , case councils\n         when '' then null\n         else councils::smallint\n       end\n     , case communities\n         when '' then null\n         else communities::smallint\n       end\n     , case zip_codes\n         when '' then null\n         else zip_codes::smallint\n       end\n     , case municipalities\n         when '' then null\n         else municipalities::smallint\n       end\n  from traffic_violations;\n<\/pre>\n<p>The statement contains some <a href=\"https:\/\/www.postgresql.org\/docs\/12\/functions-conditional.html#FUNCTIONS-CASE\" target=\"_blank\" rel=\"noopener noreferrer\">&#8220;case&#8221;<\/a> expressions to test for empty strings. If you do not do this you get issues like this when you cast into a specific data type:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\npsql: ERROR:  invalid input syntax for type smallint: \"\"\n<\/pre>\n<p>The beauty of a materialized view is, that you can refresh whenever the underlying data set changed, e.g.:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\npostgres=# refresh materialized view mv_traffic_violations WITH data;\nREFRESH MATERIALIZED VIEW\n<\/pre>\n<p>Note that this will block access to the materialized view for the time of the refresh. You could avoid that with <a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-refreshmaterializedview.html\" target=\"_blank\" rel=\"noopener noreferrer\">refreshing concurrently<\/a> but that only works when you have a unique index on the materialized view. With this data set we can not create a unique index because some of the rows are duplicates, e.g.:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\npostgres=# select * from mv_traffic_violations where seqid='b87c908c-ce2d-4c10-89fa-ca48735af485' and date_of_stop = '2012-11-07' and time_of_stop = '05:07:00' and description = 'FAILURE OF VEH. DRIVER IN ACCIDENT TO LOCATE AND NOTIFY OWNER OF UNATTENDED VEH. OF DAMAGE' and charge = '20-105(b)' and violation_type = 'Citation';\n-[ RECORD 1 ]-----------+-------------------------------------------------------------------------------------------\nseqid                   | b87c908c-ce2d-4c10-89fa-ca48735af485\ndate_of_stop            | 2012-11-07\ntime_of_stop            | 05:07:00\nagency                  | MCP\nsubagency               | 2nd District, Bethesda\ndescription             | FAILURE OF VEH. DRIVER IN ACCIDENT TO LOCATE AND NOTIFY OWNER OF UNATTENDED VEH. OF DAMAGE\nlocation                | IFO 2531 ROSS RD\nlatitude                | 39.0222578333333\nlongitude               | -77.04575825\naccident                | Yes\nbelts                   | f\npersonal_injury         | f\nproperty_damage         | t\nfatal                   | f\ncommercial_license      | f\nhazmat                  | f\ncommercial_vehicle      | f\nalcohol                 | f\nworkzone                | f\nstate                   | MD\nvehicletype             | 02 - Automobile\nyear                    | 2002\nmake                    | SUBARU\nmodel                   | FORESTER\ncolor                   | SILVER\nviolation_type          | Citation\ncharge                  | 20-105(b)\narticle                 | Transportation Article\ncontributed_to_accident | f\nrace                    | HISPANIC\ngender                  | M\ndriver_city             | SILVER SPRING\ndriver_state            | MD\ndl_state                | MD\narrest_type             | A - Marked Patrol\ngeolocation             | (39.022257833333,-77.04575825)\ncouncil_districts       | 5\ncouncils                | 5\ncommunities             | 10\nzip_codes               | 17\nmunicipalities          | 1\n-[ RECORD 2 ]-----------+-------------------------------------------------------------------------------------------\nseqid                   | b87c908c-ce2d-4c10-89fa-ca48735af485\ndate_of_stop            | 2012-11-07\ntime_of_stop            | 05:07:00\nagency                  | MCP\nsubagency               | 2nd District, Bethesda\ndescription             | FAILURE OF VEH. DRIVER IN ACCIDENT TO LOCATE AND NOTIFY OWNER OF UNATTENDED VEH. OF DAMAGE\nlocation                | IFO 2531 ROSS RD\nlatitude                | 39.0222578333333\nlongitude               | -77.04575825\naccident                | Yes\nbelts                   | f\npersonal_injury         | f\nproperty_damage         | t\nfatal                   | f\ncommercial_license      | f\nhazmat                  | f\ncommercial_vehicle      | f\nalcohol                 | f\nworkzone                | f\nstate                   | MD\nvehicletype             | 02 - Automobile\nyear                    | 2002\nmake                    | SUBARU\nmodel                   | FORESTER\ncolor                   | SILVER\nviolation_type          | Citation\ncharge                  | 20-105(b)\narticle                 | Transportation Article\ncontributed_to_accident | f\nrace                    | HISPANIC\ngender                  | M\ndriver_city             | SILVER SPRING\ndriver_state            | MD\ndl_state                | MD\narrest_type             | A - Marked Patrol\ngeolocation             | (39.022257833333,-77.04575825)\ncouncil_districts       | 5\ncouncils                | 5\ncommunities             | 10\nzip_codes               | 17\nmunicipalities          | 1\n<\/pre>\n<p>So now we have the data set we can use for the partitioning examples in the next posts. To summarize, what did we do:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.data.gov\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.data.gov\/<\/a> is a great source for free data sets and we used one of them to load data into PostgreSQL<\/li>\n<li><a href=\"https:\/\/www.postgresql.org\/docs\/current\/sql-copy.html\" target=\"_blank\" rel=\"noopener noreferrer\">copy<\/a> is great for loading data into PostgreSQL<\/li>\n<li>The <a href=\"https:\/\/www.postgresql.org\/docs\/12\/functions-conditional.html#FUNCTIONS-CASE\" target=\"_blank\" rel=\"noopener noreferrer\">&#8220;case&#8221;<\/a> statement is great for testing various conditions in a statement<\/li>\n<li><a href=\"https:\/\/www.postgresql.org\/docs\/current\/rules-materializedviews.html\" target=\"_blank\" rel=\"noopener noreferrer\">materialized view<\/a> are great when you want to refresh from an underlying data set that changes, but you will need a unique index for refreshing concurrently<\/li>\n<li>You might need to <a href=\"https:\/\/www.postgresql.org\/docs\/current\/typeconv-oper.html\" target=\"_blank\" rel=\"noopener noreferrer\">cast<\/a> one data type into another<\/li>\n<\/ul>\n<p>In the next post we will look at the first partitioning strategy: Range partitioning.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the start of a series about partitioning in PostgreSQL. For this and the following posts I will use PostgreSQL 12 (which currently is in beta) so some stuff might not work if you are on PostgreSQL 11 or even on PostgreSQL 10 when declarative partitioning was introduced. This very first post is only [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[77],"type_dbi":[],"class_list":["post-12480","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","tag-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>PostgreSQL partitioning (1): Preparing the data set - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL partitioning (1): Preparing the data set\" \/>\n<meta property=\"og:description\" content=\"This is the start of a series about partitioning in PostgreSQL. For this and the following posts I will use PostgreSQL 12 (which currently is in beta) so some stuff might not work if you are on PostgreSQL 11 or even on PostgreSQL 10 when declarative partitioning was introduced. This very first post is only [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-02T11:20:42+00:00\" \/>\n<meta name=\"author\" content=\"Daniel Westermann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@westermanndanie\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Westermann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-partitioning-1-preparing-the-data-set\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-partitioning-1-preparing-the-data-set\\\/\"},\"author\":{\"name\":\"Daniel Westermann\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"headline\":\"PostgreSQL partitioning (1): Preparing the data set\",\"datePublished\":\"2019-06-02T11:20:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-partitioning-1-preparing-the-data-set\\\/\"},\"wordCount\":473,\"commentCount\":0,\"keywords\":[\"PostgreSQL\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-partitioning-1-preparing-the-data-set\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-partitioning-1-preparing-the-data-set\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-partitioning-1-preparing-the-data-set\\\/\",\"name\":\"PostgreSQL partitioning (1): Preparing the data set - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2019-06-02T11:20:42+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-partitioning-1-preparing-the-data-set\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-partitioning-1-preparing-the-data-set\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-partitioning-1-preparing-the-data-set\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL partitioning (1): Preparing the data set\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\",\"name\":\"Daniel Westermann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"caption\":\"Daniel Westermann\"},\"description\":\"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\\\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/westermanndanie\"],\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/daniel-westermann\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PostgreSQL partitioning (1): Preparing the data set - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL partitioning (1): Preparing the data set","og_description":"This is the start of a series about partitioning in PostgreSQL. For this and the following posts I will use PostgreSQL 12 (which currently is in beta) so some stuff might not work if you are on PostgreSQL 11 or even on PostgreSQL 10 when declarative partitioning was introduced. This very first post is only [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/","og_site_name":"dbi Blog","article_published_time":"2019-06-02T11:20:42+00:00","author":"Daniel Westermann","twitter_card":"summary_large_image","twitter_creator":"@westermanndanie","twitter_misc":{"Written by":"Daniel Westermann","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/"},"author":{"name":"Daniel Westermann","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"headline":"PostgreSQL partitioning (1): Preparing the data set","datePublished":"2019-06-02T11:20:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/"},"wordCount":473,"commentCount":0,"keywords":["PostgreSQL"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/","url":"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/","name":"PostgreSQL partitioning (1): Preparing the data set - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2019-06-02T11:20:42+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-partitioning-1-preparing-the-data-set\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL partitioning (1): Preparing the data set"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66","name":"Daniel Westermann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","caption":"Daniel Westermann"},"description":"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.","sameAs":["https:\/\/x.com\/westermanndanie"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=12480"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12480\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=12480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=12480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=12480"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=12480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}