Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

select abort KO because of attempting to insert duplicate key in sysstatistics

3 posts in General Discussion Last posting was on 2010-09-23 12:12:21.0Z
Simon Posted on 2010-09-22 11:51:00.0Z
Subject: select abort KO because of attempting to insert duplicate key in sysstatistics
From: Simon <sst.misc@gmail.com>
Newsgroups: sybase.public.ase.general
X-Newsreader: MesNews/1.08.03.00
MIME-Version: 1.0
Reply-To: sst.misc@gmail.com
Content-Type: text/plain; charset="iso-8859-15"; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c99eda4$1@forums-1-dub>
Date: 22 Sep 2010 04:51:00 -0700
X-Trace: forums-1-dub 1285156260 10.22.241.152 (22 Sep 2010 04:51:00 -0700)
X-Original-Trace: 22 Sep 2010 04:51:00 -0700, vip152.sybase.com
Lines: 31
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29593
Article PK: 78818

ASE 15.0.3/EBF 17156 ESD#3/Sun_svr4/OS5.8/ase1503/2776/64-bit/FBO...

Hi,

I have a simple query (select) on one table returning only one column
but with a plenty args in the where clause (about 50).

the query looks like select ID from MY_TABLE where xxx and xxx...(50
more args).

But ine ended in error with the message
Msg 2601, Level 14, State 6:
Attempt to insert duplicate key row in objects 'sysstatistics' with
unique index 'csysstatistics'
Msg 1762, Level 18, State 7:
Cannot insert rows into sysstatistics
Command has been aborted.

How come a select tries to insert data in sysstatistics?
How could I find out the rows it tries to insert?
How can I solve this issue?

Thanks for your help.


Simon

--
-- Simon --


ET Posted on 2010-09-23 07:29:59.0Z
Sender: 26fd.4c9af91f.1804289383@sybase.com
From: ET
Newsgroups: sybase.public.ase.general
Subject: Re: select abort KO because of attempting to insert duplicate key in sysstatistics
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4c9b01f7.27b9.1681692777@sybase.com>
References: <4c99eda4$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 23 Sep 2010 00:29:59 -0700
X-Trace: forums-1-dub 1285226999 10.22.241.41 (23 Sep 2010 00:29:59 -0700)
X-Original-Trace: 23 Sep 2010 00:29:59 -0700, 10.22.241.41
Lines: 48
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29598
Article PK: 78828

Hi

Have you got any additional message in the errorlog ?

Can you post the full code you are running ? Is there any
index creation involved ?

For your question
How come a select tries to insert data in sysstatistics?
---> AFAIK, a select does not insert anything in
systatistics. Only CREATE INDEX and UPDATE STATISTICS do
such an action.

Emmanuel

> ASE 15.0.3/EBF 17156
> ESD#3/Sun_svr4/OS5.8/ase1503/2776/64-bit/FBO...
>
> Hi,
>
> I have a simple query (select) on one table returning only
> one column but with a plenty args in the where clause
> (about 50).
>
> the query looks like select ID from MY_TABLE where xxx and
> xxx...(50 more args).
>
> But ine ended in error with the message
> Msg 2601, Level 14, State 6:
> Attempt to insert duplicate key row in objects
> 'sysstatistics' with unique index 'csysstatistics'
> Msg 1762, Level 18, State 7:
> Cannot insert rows into sysstatistics
> Command has been aborted.
>
> How come a select tries to insert data in sysstatistics?
> How could I find out the rows it tries to insert?
> How can I solve this issue?
>
> Thanks for your help.
>
>
> Simon
>
> --
> -- Simon --
>
>


Simon Posted on 2010-09-23 12:12:21.0Z
Subject: Re: select abort KO because of attempting to insert duplicate key in sysstatistics
From: Simon <sst.misc@gmail.com>
References: <4c99eda4$1@forums-1-dub> <4c9b01f7.27b9.1681692777@sybase.com>
Newsgroups: sybase.public.ase.general
X-Newsreader: MesNews/1.08.03.00
MIME-Version: 1.0
Reply-To: sst.misc@gmail.com
Content-Type: text/plain; charset="iso-8859-15"; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4c9b4425$1@forums-1-dub>
Date: 23 Sep 2010 05:12:21 -0700
X-Trace: forums-1-dub 1285243941 10.22.241.152 (23 Sep 2010 05:12:21 -0700)
X-Original-Trace: 23 Sep 2010 05:12:21 -0700, vip152.sybase.com
Lines: 96
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29599
Article PK: 78832


> Hi
>
> Have you got any additional message in the errorlog ?
>
> Can you post the full code you are running ? Is there any
> index creation involved ?
>
> For your question
> How come a select tries to insert data in sysstatistics?
> ---> AFAIK, a select does not insert anything in
> systatistics. Only CREATE INDEX and UPDATE STATISTICS do
> such an action.
>
> Emmanuel
>
>> ASE 15.0.3/EBF 17156
>> ESD#3/Sun_svr4/OS5.8/ase1503/2776/64-bit/FBO...
>>
>> Hi,
>>
>> I have a simple query (select) on one table returning only
>> one column but with a plenty args in the where clause
>> (about 50).
>>
>> the query looks like select ID from MY_TABLE where xxx and
>> xxx...(50 more args).
>>
>> But ine ended in error with the message
>> Msg 2601, Level 14, State 6:
>> Attempt to insert duplicate key row in objects
>> 'sysstatistics' with unique index 'csysstatistics'
>> Msg 1762, Level 18, State 7:
>> Cannot insert rows into sysstatistics
>> Command has been aborted.
>>
>> How come a select tries to insert data in sysstatistics?
>> How could I find out the rows it tries to insert?
>> How can I solve this issue?
>>
>> Thanks for your help.
>>
>>
>> Simon
>>
>> --
>> -- Simon --

Hi Emmanuel,

Here's the query and message I have (just replace some args)

select count(*) from IDGNGLBVAL where PF_COD = 'xxx' and INST_NUM =
xxx and INST_TYP = xx and
POS_TYP = 'xxx' and INST_CUR = 'xxx' and VALUATION_DAT = 'Sep 21 2010'
and AVG_LIFE = 0 and CONVEXITY = 0 and
CP_INST_CAP_FEES = xxx.xxx and CP_PF_CAP = xxx.xxx and CP_PF_CAP_FEES =
xxx.xxx and
CTRY_ACR = 'xxx' and DURATION = 0 and GL_CAP_CPN_FEES = -xxx.xxx and
GL_CAP_CPN_FEES_I = -xxx.xxx
and INST_ACR = 'xxx.xx' and INST_C_FREE2 = '2' and INST_C_FREE4 = 'xxx'
and INST_COD = 'xxx' and INST_CUR_RATE = xxx.xxx
and INST_ISIN_COD = 'xxx' and ISSR_GRP_COD = 0 and MKT_LOC_COD = xxx
and NOMINAL_AMT = 1 and NOMINAL_CUR = 'xxx' and NOMINAL_RATE = 0
and PF_CUR = 'xxx' and PF_CUR_RATE = xxx.xxx and POS_QTY = 10300 and
QTY_EXPR = 'Q' and QUOTE_CLOSE = 3820 and QUOTE_DAT = 'Sep 17 2010'
and QUOTE_MOD = 'P' and QUOTE_OPEN = 3730 and UCP_INST_CAP = xxx.xxx
and UCP_INST_CAP_FEES = xxx.xxx and UCP_INST_CPN = 0
and UCP_PF_CAP = xxx.xxx and UCP_PF_CAP_FEES = xxx.xxx and UCP_PF_CPN =
0 and UNDRLYG_QTY = 0 and VALU_CONTRAT = 0
and VALU_CONTRAT_I = 0 and VALU_CPN = 0 and VALU_CPN_I = 0 and VALU_CUR
= 'xxx' and VALU_CUR_RATE = 1 and VALU_EX_CPN = xxx.xxx
and VALU_FULL_CPN = xxx.xxx and VALU_FULL_CPN_I = xxx and VALU_GAINLOSS
= 0 and VALU_GAINLOSS_I = 0 and VALU_INTEREST = 0
and VALU_INTEREST_I = 0 and VALU_MARCHE = xxx.xxx and VALU_MARCHE_I =
xxx and VALU_POS = xxx.xxx
and VALU_POS_I = xxx and YTM = 0 and VALU_EX_CPN_I = xxx and
INST_NAM = 'xxx' and POS_QTY_ORIG_FACE = 0 and USERKEY = 'xxx'

Here's the error message :
Server Message: Number 2601, Severity 14
Server 'SYB15_PRO', Line 1:
Attempt to insert duplicate key row in object 'sysstatistics' with
unique index 'csysstatistics'
Server Message: Number 1762, Severity 18
Server 'SYB15_PRO', Line 1:
Cannot insert rows into sysstatistics
Server Message: Number 3621, Severity 10
Server 'SYB15_PRO', Line 1:
Command has been aborted.

Simon

--
-- Simon --