Check partition that a query is accessing.

Teradata Database on VMWare
Fan

Check partition that a query is accessing.

Hi,

Is there any way to get information about the partition that is being accessed when a query is being fired on a VMWare Teradata. I got one table that  has the query text in DBQL for all the queries hit.

Any table that provides partition column directly or any way to find out from the query text?

Thanks

Jatan

1 REPLY
Junior Contributor

Re: Check partition that a query is accessing.

Hi Jatan,

why do you need that information?

It's not available in DBQL, depending on the Select it might be a single partition or 200000, how to store it?

The Explain text found in QryLogExplainV will include the number of partitions accessed like "single partition", "4 partitions", "all partitions".

If it's a WHERE-condition based on equality you could pass it to the partitioning function found in dbc.PartitioningConstraintsV.ConstraintText (after removing the CHECK):

SELECT CURRENT_DATE AS LogDate,
RANGE_N(LogDate BETWEEN DATE '2010-01-01' AND DATE '2030-12-31' EACH INTERVAL '1' DAY )

2016-04-13 2295