Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EF017C131 for ; Wed, 9 May 2012 03:21:59 +0000 (UTC) Received: (qmail 35399 invoked by uid 500); 9 May 2012 03:21:58 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 35297 invoked by uid 500); 9 May 2012 03:21:58 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 35259 invoked by uid 99); 9 May 2012 03:21:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 May 2012 03:21:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 May 2012 03:21:55 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id AEE0743B670 for ; Wed, 9 May 2012 03:21:34 +0000 (UTC) Date: Wed, 9 May 2012 03:21:34 +0000 (UTC) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Message-ID: <960427250.42308.1336533694885.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (DERBY-4115) Provide a way to drop statistics information MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271039#comment-13271039 ] Mamta A. Satoor commented on DERBY-4115: ---------------------------------------- Kristian, as for your following comment d) SystemProcedures.SYSCS_DROP_STATISTICS: o Also, I don't understand the comment about indexname being the empty string. Is that allowed? The parser falls over if I try to specify it as an argument to the SQL call. You are right, that giving an empty string makes the parse give following exception. I tried using empty string with compress table/update statistics procedure and saw the same behavior. I will go ahead and file a jira for that issue in general. ij> call syscs_util.SYSCS_DROP_STATISTICS( 'APP', 'T1', '' ); ERROR 38000: The exception 'java.sql.SQLException: Syntax error: Encountered "\"" at line 1, column 40.' was thrown while evaluating an expression. java.sql.SQLException: The exception 'java.sql.SQLException: Syntax error: Encountered "\"" at line 1, column 40.' was thrown while evaluating an expression. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:98) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Util.java:142) at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java:278) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2360) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1334) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:630) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:559) at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:367) at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:527) at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:369) at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:245) at org.apache.derby.impl.tools.ij.Main.go(Main.java:229) at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184) at org.apache.derby.impl.tools.ij.Main.main(Main.java:75) at org.apache.derby.tools.ij.main(ij.java:59) Caused by: java.sql.SQLException: The exception 'java.sql.SQLException: Syntax error: Encountered "\"" at line 1, column 40.' was thrown while evaluating an expression. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:42) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:122) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71) ... 17 more Caused by: java.sql.SQLException: Syntax error: Encountered "\"" at line 1, column 40. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:42) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:122) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:256) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:424) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2360) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.(EmbedPreparedStatement.java:153) at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Driver40.java:107) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1685) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1513) at org.apache.derby.catalog.SystemProcedures.SYSCS_DROP_STATISTICS(SystemProcedures.java:792) at org.apache.derby.exe.acace4c0a3x0137x2f19xcc22x00000013e5701.g0(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(ReflectMethod.java:46) at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(CallStatementResultSet.java:75) at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:443) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:324) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1242) ... 10 more Caused by: ERROR 42X01: Syntax error: Encountered "\"" at line 1, column 40. at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:278) at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(ParserImpl.java:153) at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:357) at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99) at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1103) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.(EmbedPreparedStatement.java:134) ... 24 more ERROR 42X01: Syntax error: Encountered "\"" at line 1, column 40. java.sql.SQLSyntaxErrorException: Syntax error: Encountered "\"" at line 1, column 40. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:92) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:256) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:424) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2360) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.(EmbedPreparedStatement.java:153) at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Driver40.java:107) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1685) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(EmbedConnection.java:1513) at org.apache.derby.catalog.SystemProcedures.SYSCS_DROP_STATISTICS(SystemProcedures.java:792) at org.apache.derby.exe.acace4c0a3x0137x2f19xcc22x00000013e5701.g0(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.apache.derby.impl.services.reflect.ReflectMethod.invoke(ReflectMethod.java:46) at org.apache.derby.impl.sql.execute.CallStatementResultSet.open(CallStatementResultSet.java:75) at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:443) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:324) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1242) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:630) at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:559) at org.apache.derby.impl.tools.ij.ij.executeImmediate(ij.java:367) at org.apache.derby.impl.tools.ij.utilMain.doCatch(utilMain.java:527) at org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.java:369) at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:245) at org.apache.derby.impl.tools.ij.Main.go(Main.java:229) at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:184) at org.apache.derby.impl.tools.ij.Main.main(Main.java:75) at org.apache.derby.tools.ij.main(ij.java:59) Caused by: java.sql.SQLException: Syntax error: Encountered "\"" at line 1, column 40. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:42) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:122) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:71) ... 30 more Caused by: ERROR 42X01: Syntax error: Encountered "\"" at line 1, column 40. at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:278) at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(ParserImpl.java:153) at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:357) at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99) at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1103) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.(EmbedPreparedStatement.java:134) ... 24 more Issue the 'help' command for general information on IJ command syntax. Any unrecognized commands are treated as potential SQL commands and executed directly. Consult your DBMS server reference documentation for details of the SQL syntax supported by your server. > Provide a way to drop statistics information > -------------------------------------------- > > Key: DERBY-4115 > URL: https://issues.apache.org/jira/browse/DERBY-4115 > Project: Derby > Issue Type: Improvement > Components: SQL > Affects Versions: 10.6.1.0 > Reporter: Kathey Marsden > Assignee: Mamta A. Satoor > Attachments: DERBY4115_patch1_diff.txt, DERBY4115_patch2_diff.txt, DERBY4115_patch3_diff.txt, DERBY4115_patch4_diff.txt, DERBY4115_patch5_diff.txt > > > Now that DERBY-269 has been resolved, users can update statistics, but once they do, they are committed to using and maintaining the statistics, even if it doesn't improve performance or they have difficulty maintaining the statistics on a regular basis. It would be good to have a way to drop statistics information so that users could revert to the prior behavior if needed. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira