If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Update statistics, lock

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-24-11, 05:20
kirat kirat is offline
Registered User
 
Join Date: Feb 2011
Posts: 2
Update statistics, lock

Hi every body,

i have a problem when i execute an update statistics, the thread btree clean lock a table and the lock is always here.

the consequences is that i can't do an dbexport on my base who need an exclusive "right" on it.

onstat -u :

address flags sessid user tty wait tout locks nreads nwrites

44d64a70 ---PX-B 103579 root - 0 0 1 23939 400

onstat -k :

address wtlist owner lklist type tblsnum rowid key#/bsiz

460be790 0 44d64a70 0 HDR+IX 200081 0 0

have you got some ideas ?

Thanks in advance,

Kirat
Reply With Quote
  #2 (permalink)  
Old 08-26-11, 04:41
kirat kirat is offline
Registered User
 
Join Date: Feb 2011
Posts: 2
Post

i have find something interesting with onstat -C :

onstat -C

IBM Informix Dynamic Server Version 10.00.UC6 -- On-Line -- Up 3 days 15:36:38 -- 72912 Kbytes

Btree Cleaner Info
BT scanner profile Information
==============================
Active Threads 1
Global Commands 0
Number of partition scans 2919
Main Block 0x45385ab0
BTC Admin 0x00000000


BTS info id Prio Partnum Key Cmd
0x45c9dd48 0 High 0x00300158 1 10000000 Scan index
Number of leaves pages scanned 503310006
Number of leaves with deleted items 503248613
Time spent cleaning (sec) 4391
Number of index compresses 1006495443
Number of deleted items 28958
Number of index range scans 0
Number of index leaf scans 59
Number of index alice scans 0
Scan Type Leaf

and an onstat -C clean :

onstat -C clean

IBM Informix Dynamic Server Version 10.00.UC6 -- On-Line -- Up 3 days 15:36:15 -- 72912 Kbytes

Btree Cleaner Info

Index Cleaned Statistics
=========================
Partnum Key Dirty Hits Clean Time Pg Examined Items Del Pages/Sec

this is the index partion number where the btree is stuck

0x00300158 1 C 0 107076 1616214855 142 15094.09

i can see that the btree scan to the infini this partition.

we can find the index and her table with this :

Find the index:

SELECT indexname
FROM sysfragments
WHERE hex(partn) = 'partnum';


Identify the indexed table:

SELECT tabname
FROM sysfragments f, sysindexes i, systables t
WHERE hex(f.partn) = 'partnum'
AND f.indexname = i.idxname
AND i.tabid = t.tabid;


Note: partnum is the partition number. Be sure to use capital letters for the hex value, as in this example:

SELECT indexname FROM sysfragments WHERE hex(partn) = '0x0010016B';

now i know wich is the index and the indexed table who stuck the btree scann.

the next questions are :
may i rebuild this index whithout stopping the server's production ?
can i rebuild only this index or i have to rebuild the entire index ...

thanks in advance

Kirat
Reply With Quote
Reply

Tags
lock, update statistics

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On