Show partitions allocated to a specific raw or historical poll data table

This query lists the partitions allocated to a specific raw or historical poll data table. This query is useful if you want to investigate whether all partitions are being created properly.

The sample query provided shows partitions allocated to the raw poll data , pollData. By default, this table stores approximately an hour of raw poll data, and the table is partitioned into 8 partitions of 10 minutes each. Check the results of this query to make sure that the upper and lower ranges of the partition reflect expected values according to the clock on the server hosting the database. If these times are not current then either the relevant instance of the Polling engine, ncp_poller, is not runnning, or there is a problem creating new partitions.

Example

This example query displays sample SQL to show partitions allocated to the raw poll data , pollData.
select TABNAME,DATAPARTITIONNAME,LOWTIME,HIGHTIME 
from ncpolldata.pollDataPartitions
WHERE TABNAME = 'POLLDATA'
ORDER BY HIGHTIME
The table below describes this query.
Table 1. Description of the query 
Line numbers Description
1
Specify the data to show in the results.
  • TABNAME: name of thje table to which the partitions belong.
  • DATAPARTITIONNAME: name of the partitions.
  • LOWTIME: lower time limit for the partition.
  • HIGHTIME: upper time limit for the partition.
2 Specify the pollDataPartitions table as the driving table for this query.
3 Limit the partition data retrieved to those partitions related to the pollData table.
4 List results in order of the HIGHTIME column. This orders the data by latest partition first.

Results

The table below shows sample results for this query.
Table 2. Results of the query

Table name

Partition name

Low time

High time

POLLDATA

PART_1439376000

2015-08-13 13:00:00

2015-08-13 13:10:00

POLLDATA

PART_1439376600

2015-08-13 13:10:00

2015-08-13 13:20:00

POLLDATA

PART_1439377200

2015-08-13 12:00:00

2015-08-13 12:10:00

POLLDATA

PART_1439377800

2015-08-13 12:10:00

2015-08-13 12:20:00

POLLDATA

PART_1439378400

2015-08-13 12:20:00

2015-08-13 12:30:00

POLLDATA

PART_1439374200

2015-08-13 12:30:00

2015-08-13 12:40:00

POLLDATA

PART_1439374800

2015-08-13 12:40:00

2015-08-13 12:50:00

POLLDATA

PART_1439374800

2015-08-13 12:50:00

2015-08-13 13:00:00