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 > Other > Ingres 2.0 - Locking issue???

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-08-04, 21:36
alan_dba alan_dba is offline
Registered User
 
Join Date: Jun 2004
Posts: 1
Ingres 2.0 - Locking issue???

Hello,

I am new too ingres (so please be gentle), there is a report we run every month or so which adds up a bunch of numbers in the database and converts them too minutes. When i try to run the report this month it hangs... The following is what iimonitor tells me for this query:

Session 31AEC700 (dba ) cs_state: CS_COMPUTABLE cs_mask:
DB Name: dbname (Owned by: dba )
User: dba (dba )
User Name at Session Startup: dba
Terminal: batch
Group Id:
Role Id:
Application Code: 00000000 Current Facility: QEF (00000006)
Client user: dba
Client host: machinename
Client tty: 18
Client pid: 24874
Client connection target: dbname
Client information: user='dba',host='machinename',tty='18',pid=24874,c onn='dbname'
Description:
Query: select * from tablename where columnname = number

And in ipm it seems to have a lock on the table...

and displays:

ID RQ State Lock Type DB Table
53 S GR PHY Control dbname, TABLE: tablename
133 S GR PHY Control column1
c9 S GR PHY Control column2
50 X GR PHY Table ??=-65381,0

Does anyone know what this means exactly, i can gather it has a lock, but im unsure as to what caused it and how to prevent it.

Thanks in advance for any help.

Cheers,
Alan
Reply With Quote
  #2 (permalink)  
Old 06-09-04, 04:25
PaulMason PaulMason is offline
Registered User
 
Join Date: Nov 2002
Posts: 33
Hi Alan,

What you have there are control locks. These are not going to block other sessions from reading the table, or even updating it. They will block another session from making changes to the structure of the table - modify, alter table, drop. These control locks are usually only held while a query is executing - not for the duration of a transaction. You can't tell ingres not to take out control locks.

The other lock you have there is an exclusive lock on a temporary table - you can tell it's temporary because the reltid (-65381) is negative. Since it's a temporary table it's either the result of a join or a global temporary table - either way it's private to your session and so that lock won't affect other sessions either.

HTH
Paul
__________________
Paul Mason
Reply With Quote
Reply

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