Teradata SQL Assistant 15.00 DROP STATISTICS not working

Database
Enthusiast

Teradata SQL Assistant 15.00 DROP STATISTICS not working

We cannot drop statistics with the syntax we normally use, when using the new SQL Assistant 15.00.

We have tried logging on both with ODBC, with several changes in the setup and with Teradata logon.

I tested with:

CREATE MULTISET TABLE T1 (val INTEGER);
COLLECT STATISTICS T1 COLUMN val;
DROP STATISTICS T1;

When I run the last line I get the following error: Query is invalid

It is working ok, when I try with SQL Assistant 13.11.0.05

Br

Peter Schwennesen

10 REPLIES
Supporter

Re: Teradata SQL Assistant 15.00 DROP STATISTICS not working

Hi Peter,

you are using the old stats syntax.

The current / new on is 

COLLECT STATISTICS COLUMN val on T1;

I guess - but can't validate right now, as I don't have SQLA 15.0 installed here - this will work...

Check also http://developer.teradata.com/blog/carrie/2012/08/new-opportunities-for-statistics-collection-in-ter...

which gives a bit of background

Ulrich

Enthusiast

Re: Teradata SQL Assistant 15.00 DROP STATISTICS not working

Ok, The new syntax works too.

But I cannot find any new syntax for:

DROP STATISTICS T1;

Peter Schwennesen

Supporter

Re: Teradata SQL Assistant 15.00 DROP STATISTICS not working

try 

DROP STATISTICS on T1;

or

DROP STATISTICS COLUMN VAL on T1;

If both are not working I would raise a ticket at TD.

Ulrich

Below syntax diagram from the SQL manual:



Supporter

Re: Teradata SQL Assistant 15.00 DROP STATISTICS not working

ok - adding the jpg didn't work - check syntax diagram in Chapter 16 Statistics Statements of SQL Data Definition Language

Syntax and Examples

Enthusiast

Re: Teradata SQL Assistant 15.00 DROP STATISTICS not working

I tried all of:

DROP STATISTICS ON T1;
DROP STATISTICS COLUMN VAL ON T1;
DROP STATISTICS COLUMN (VAL) ON T1;

all with same result: Query is invalid

This is when I do it in Teradata SQL Assistant 15.00

Do you think "Teradata" are reading this? How do I raaise a ticket to TD?

Peter Schwennesen

Senior Apprentice

Re: Teradata SQL Assistant 15.00 DROP STATISTICS not working

This was fixed in SQLA 15.0.0.3 :-)

Enthusiast

Re: Teradata SQL Assistant 15.00 DROP STATISTICS not working

Hi Dieter

I expect that it will be in a TTU?

But the download page says that it is version 15.00

Where do I get the version15.0.0.3?

Peter Schwennesen

Teradata Tools and Utilities 15.00.00.00






ABOUT THIS DOWNLOAD

TTU Windows Package

This Teradata Tools and Utilities (TTU) 15.00 package is the full collection of Teradata client tools for Windows.

This includes SQL Assistant, load & unload utilities, database management, administration and drivers, and much more to be used to connect to your Teradata Express database instance (downloaded separately).  Installation is easy and simple using a Windows installer.  The size of the download zip file is 500 MB.  To install, extract the zip file into a temporary folder and run the setup.exe program.

For feedback, discussion, and community support, please visit the Tools forum.




Senior Apprentice

Re: Teradata SQL Assistant 15.00 DROP STATISTICS not working

Hi Peter,

as a TD customer you don't need to download the TTU from DevEx, ask your DBA to get it from T@YS, there's always the latest version.

Teradata Employee

Re: Teradata SQL Assistant 15.00 DROP STATISTICS not working

actually i have the same issue on DROP STATS with SQLAssistant 15.0.

I'm going to install the lastest version 15.03, hopefully that issue has been patched.