Netezza Date Functions and Examples

This article is about detailed descriptions and examples of the standard Netezza date functions that you can use to manipulate date columns in the Netezza SQL and Netezza stored procedure. In the real word scenarios many application manipulate the date and time data types. Date types are highly formatted and very complicated. Each date value contains the century, year, month, day, hour, minute, and second. Each RDBMS may employ different date functions, and there may also be differences in the syntax for each RDBMS even when the function call is the…

Continue ReadingNetezza Date Functions and Examples
Comments Off on Netezza Date Functions and Examples

Netezza Analytic Functions

Netezza analytic functions compute an aggregate value that is based on a group of rows. A Netezza SQL analytic function works on the group of rows and ignores the NULL in the dat.  Netezza server is basically an analytics system and provides many useful functions that can perform day to day aggregations. As these functions are native to Netezza server, hence use of these Netezza analytic functions improves performance of SQL queries as well as server performance. Frequently used Netezza analytical functions are as follows: COUNT Analytic Function Returns the number of…

Continue ReadingNetezza Analytic Functions
Comments Off on Netezza Analytic Functions

Collocated Joins in Netezza: Optimizing Query Performance

In Netezza, if two tables are distributed on same column then such tables are called collocated tables. If you join two collocated tables than each SPU in system works 100% independent to each other as the relevant rows required for joining these tables exist in the same SPU. These types of joins are called collocated joins. Collocated Joins Example Let’s take an examples, assume that we have two tables a patient and hospital, both are distributed on patient id. Netezza distributes the rows with same distribution key (column) to same…

Continue ReadingCollocated Joins in Netezza: Optimizing Query Performance
2 Comments

Netezza nzsql Command and its Usage

The Netezza nzsql command invokes a SQL command interpreter on the Netezza host or any Unix/Linux system that can act as a edge node to connect to Netezza host. Read: Netezza Basic Commands Commonly used basic Netezza Linux Commands You can use the nzsql command to perform all the sql related stuffs. E.g. create database objects, run queries, and manage various databases created on that particular server. You cannot manage the object created in different host or server. Read: nzload Command and its Usage in Netezza Netezza nzsql Internal Slash…

Continue ReadingNetezza nzsql Command and its Usage
4 Comments

Analyze and Optimize Netezza Query Performance

Analyze and Optimize Netezza Query Performance is very important part if you are performing the reporting on top of Netezza or processing large amount of data. Netezza query tuning is very important part to improve performance. Netezza uses cost based optimizer to determine the best methods for scan and join operations, orders and redistribute or broadcast operations. Netezza system may redistribute the data for some situations like joins, grouping aggregates, create tables and when loading data into Netezza tables. System will decide the redistribution based on the cost like table…

Continue ReadingAnalyze and Optimize Netezza Query Performance
Comments Off on Analyze and Optimize Netezza Query Performance

Working with Materialized Views in Netezza

When you create a materialized views from a base table, the Netezza system stores the view definition for the lifetime of the SPM view and is visible as a materialized view. SPM view data slices are co-located on the same data slices as the corresponding base table data slices hence increases the performance of the query. A materialized views reduces the width of number of columns being scanned in a base table, these type of view contains a small subset of frequently queried columns. When you query the table (table with large number of…

Continue ReadingWorking with Materialized Views in Netezza
Comments Off on Working with Materialized Views in Netezza

How to install vmware player and Netezza Emulator on ubuntu

The Netezza emulator is an emulated Netezza appliance that runs both a virtual host and a virtual S-Blade. It is a fully functional system to be used for initial development and testing only. This tool should never be used in the PRODUCTION environment. It is simply a tool for developers only and you cannot use it for performance optimization. You can use this tool to learn the Netezza appliance. Note: This tutorial is tested on the ubuntu 14.04 Useful Netezza Emulator Information Short information that you might want to know before start using Netezza emulator You should treat…

Continue ReadingHow to install vmware player and Netezza Emulator on ubuntu
Comments Off on How to install vmware player and Netezza Emulator on ubuntu

Working with Netezza Stored Procedures

Netezza stored procedures are used to encapsulate the business logic and same time handle the exceptions. SQL provides the power to get and update the database information on the host server, and the procedure language provides the logic for if-then-else branching and application processing on the data. Read: Netezza RECORD Type Variable, Usage and Examples Netezza Stored Procedure ARRAY Variables and Examples For example, you may want to check the table if its existed in database before dropping it. You achieve this by creating stored procedure. e.g. CALL DROP_IF_EXIST(table_name); if you…

Continue ReadingWorking with Netezza Stored Procedures
Comments Off on Working with Netezza Stored Procedures

Working with Netezza Clustered Base Tables (CBT)

A Netezza clustered base tables (CBT) are user table that has data which is organized using one to four organizing keys columns. You can specify max four columns in organize on clause and those columns should not be a part of distribute on clause. An organizing key is a column of the table that you specify for clustering the table records; organizing table helps Netezza to save records in same or nearby extents. You can organize the records using "ORGANIZE ON" clause. Netezza does create zone maps on organizing columns, which will accelerate the performance of queries on that…

Continue ReadingWorking with Netezza Clustered Base Tables (CBT)
Comments Off on Working with Netezza Clustered Base Tables (CBT)

Groom in Netezza Tables and Databases with Aginity

Before getting into how to groom Netezza table and database, first let’s understand what grooming is? Use the GROOM TABLE command to maintain the user tables by reclaiming disk space for deleted or outdated rows. You can also use GROOM TABLE command to reorganize the tables by their organizing keys columns. End user can execute DML statements such as SELECT, UPDATE, DELETE, and INSERT operations while the data grooming is running. The SELECT operations run in parallel with the grooming operations and any INSERT, UPDATE, and DELETE operations run serially between the…

Continue ReadingGroom in Netezza Tables and Databases with Aginity
Comments Off on Groom in Netezza Tables and Databases with Aginity