Page 1 of 1

SYSINDEX flags and other questions

Posted: Tue Aug 20, 2002 2:22 pm
by skalyanaraman
Hi,
Long time ago, I was asking questions about checking SYSINDEX to see if any index has been running to run our createindex scripts just one at a time. I was told to check for these flags in the TYPE field,

(TYPE='f' or TYPE='m' or TYPE='T' or TYPE='C')

to see if any index is being updated currently. But, this seems to be working fine on our NT platform and on UNIX now, we could not somehow control more than 1 createindex running concurrently. Is there any difference in the TYPE flags? new flags?

We are using Texis 3.0 and 4.0 on Solaris 2.8

OTHER QUESTIONS:
Is there a way to throttle the memory usage by texis searches? The other day a client was running a search, a OR search, and the texis process soaked up 85% of the memory out of 4GB memory on the machine. The other searches by the users were slow.

Thanks!!

SYSINDEX flags and other questions

Posted: Tue Aug 20, 2002 4:31 pm
by mark
Creating a regular index would be TYPE='c' . I'm not sure what you mean by not being able to control.

See ramlimit and ramrows at http://www.thunderstone.com/site/texisman/node149.html

SYSINDEX flags and other questions

Posted: Tue Aug 20, 2002 4:40 pm
by mark
See also btreethreshold at http://www.thunderstone.com/site/texisman/node153.html

ramlimit and ramrows will only affect queries using "order by".

what was the form of your query?

SYSINDEX flags and other questions

Posted: Tue Aug 20, 2002 5:29 pm
by skalyanaraman
By "not able to control", I meant
There was some index running on the database and the flags were not one of the 4 I had listed. Does that make sense?
Also, we are trying to update the indexes for Metamorph inverted indexes, not regular ones.


Thanks!!

SYSINDEX flags and other questions

Posted: Tue Aug 20, 2002 5:50 pm
by mark
You may have hit a race condition where you checked for process, then flag in table (or vice versa) and a process started in between your checks. What TYPE did you get?

SYSINDEX flags and other questions

Posted: Tue Aug 20, 2002 5:52 pm
by skalyanaraman
Sorry, did not check the TYPE flag. Just happened to see createindexes are running simultaneously. Also, the key info here is that users are constantly updating data in the tables, pretty much round the clock.

Maybe, we cannot do anything about it, huh.
thanks

SYSINDEX flags and other questions

Posted: Tue Aug 20, 2002 6:24 pm
by mark
Let chkind (or the monitor) do it automatically, that's what it's for. It will only do one at a time. See SYSMETAINDEX and related items in the manual.

If you're trying to write your own serializer you should also do your own locking. Something similar to this maybe: Create a single row table with an int field.
<sql novars "update lock set locked=1,when='now' where locked=0"></sql>
<if $loop eq 0>
<!-- didn't get lock -->
<else>
<!-- got the lock -->
do something
<sql novars "update lock set locked=0"></sql>
</if>