Alexey Gaidukov wrote:

> Becker, Holger пишет:
> 
> >Alexey Gaidukov wrote:
> >
> >  
> >
> >>I have table with 2 millions records. I have a field with index.
> >>    
> >>
> >Simple 
> >  
> >
> >>statement: "select * from table where field in (1,2,3)" 
> performs very 
> >>fast. But the statement "delete from table where field in (1,2,3)"
> >>    
> >>
> >takes 
> >  
> >
> >>about 15 minutes. What is wrong? I'm using MaxDB alone so 
> thare aren't
> >>    
> >>
> >
> >  
> >
> >>any locks.
> >>    
> >>
> >
> >Hi,
> >
> >In general Index should be used by select and by delete.
> >
> >Would you mind sending me the ouput of the explain statement of
> >the select statement extended by for reuse clause.
> >
> >Example:
> >explain
> >select * from table where field in (1,2,3) for reuse
> >
> >Kind regards 
> >Holger
> >
> >  
> >
> 
> 
> If I try to delete record with CARTNUM=1 from PATS and in the table 
> INVEST there are recodrs with CARTNUM=1 then I get error message
> Integrity constraint violation;350 POS(1) Referential integrity 
> violated:INVEST_CARTNUM_FK
> very fast. But if there don't exist records in INVEST with CARTNUM=1 
> then deleting takes some hours.

Hi,

seems that something went wrong with the access to the foreign key table.

Could you please create a special vtrace of this situation and send it to me.
To create the vtrace follow these steps:

1. Start the trace: dbmcli -d <dbname> -u <dbm,dbm> util_execute diagnose 
vtrace default optimize on 

2. Execute your long running delete

3. Flush the trace: dbmcli -d <dbname> -u <dbm,dbm> util_execute diagnose 
vtrace flush or more simply dbmcli -d <dbname> -u <dbm,dbm> trace_flush 

4. Create the text representation: dbmcli -d <dbname> -u <dbm,dbm> trace_prot 
akbms

5. Copy the text representation to a local file: dbmgetf -d <dbname> -u 
<dbm,dbm> -k KNLTRCPRT -f <local file name> 

6. Stop writing of the trace: dbmcli -d <dbname> -u <dbm,dbm> util_execute 
diagnose vtrace default optimize off

Thanks in advance.

Kind regards 
Holger

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to