All Forums Database
06 Oct 2014
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

ulrich 816 posts Joined 09/09
06 Oct 2014

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-teradata-14-0
which gives a bit of background
Ulrich
 

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

06 Oct 2014

Ok, The new syntax works too.
But I cannot find any new syntax for:

DROP STATISTICS T1;

Peter Schwennesen

ulrich 816 posts Joined 09/09
07 Oct 2014

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:

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

ulrich 816 posts Joined 09/09
07 Oct 2014

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

Syntax and Examples

 

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

07 Oct 2014

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

dnoeth 4628 posts Joined 11/04
07 Oct 2014

This was fixed in SQLA 15.0.0.3 :-)

Dieter

08 Oct 2014

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

Version:

15.00.00.00

Released:

15 May 2014

TTU:

15.00

OS:

Windows i386 (32-bit), Windows x86-64 (64-bit)

Teradata:

15.0, 14.10, 14.0, 13.10, 13.0

 TTU 15.00 Installer

 TTU 15.00 ReadMe

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.

 

dnoeth 4628 posts Joined 11/04
08 Oct 2014

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.

Dieter

Dany3R9 18 posts Joined 03/14
15 Oct 2014

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.
 
 

drmkd17 54 posts Joined 10/12
12 Jul 2016

SAME IS NOT working in Teradata 14.10. 
How to get the Drop stats work ??Any particular syntax?

You must sign in to leave a comment.