Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Using a dedicated indexer on network
I have recently learned how to make one instance of OI work as a dedicated indexer for the network. This has opened up much faster searches using Select and Btree by not having to update before each select process.
To set this up, I currently have a manual process of opening an instance of OI on our server and running a subroutine with the following code:
Declare Subroutine Set_Bgnd_IX_Time, Set_IDXSvr
// update indexes every 10 seconds
Set_Bgnd_IX_Time(10)
// turn on dedicated indexing
Set_IDXSvr(1)
I would like to have a more automated way of doing this. What would be best practices on starting up OI as a dedicated indexer on the network each day?
To set this up, I currently have a manual process of opening an instance of OI on our server and running a subroutine with the following code:
Declare Subroutine Set_Bgnd_IX_Time, Set_IDXSvr
// update indexes every 10 seconds
Set_Bgnd_IX_Time(10)
// turn on dedicated indexing
Set_IDXSvr(1)
I would like to have a more automated way of doing this. What would be best practices on starting up OI as a dedicated indexer on the network each day?
Comments
On a side note, I haven't been able to understand the Database Manager Environment Settings for Indexing. There is a setting there called "Delay before Indexing", as well as checkboxes for "Update before Query" and "Update Before Btree Extract". From what I understand, if I put a value greater than zero, X, on the "Delay before Indexing", the Engine will index files when it is idle for X number of seconds. I have not been able to get indexing to happen this way in my application. No matter what value I put in the "Delay before Indexing", no indexes were updated even when left idle for long periods of time. I've had to resort to check the boxes "Update before Query" and "Update Before Btree Extract" to make sure that selecting was done accurately of indexed data. This of course added longer search times for indexed data, because it had to update the index before the select happened. Is there something that I am missing for the "Delay before Indexing" feature to work properly?
Would a dedicated indexing machine be a best practices solution? It seems that starting an instance of OI on the server using the /I command parameter would work good, but how can I start it up automatically at a certain time of day every day to not depend on a user to start it up manually?
Your understanding of the "Delay before indexing" setting is correct. If this isn't working for you then I suspect you might need a patch. I recall a fix being made to the dedicated indexer but I don't recall background indexing having any issues. Nevertheless, it is always good to get to the latest patch. What is your current version of OI?
The dedicated indexer isn't necessary a best practice solution. It really depends on what you need. I like it because it is simple to launch and it can be closed easily enough. In your programmatic solution, how are you launching OI? That is, did you create a dedicated user that bypasses security and runs this code without any prompting?
How much automation do you require? For instance, do you want this to run the moment the machine is restarted? Does the user have to login to the machine or do you want it to run like a service?
I am using version 9.4 You had helped me roll it up from version 9.3 last year sometime.
In my programmatic solution, I open a session on my server. I open the SRP Editor and run the subroutine manually from the SRP Editor command line. I have to shut down the session at end of day to not interfere with the back up, so I would need someone to manually open and close the session each day. What I would like to accomplish is to have automatic indexing started and closed each day (and not interfere with the back up). I'm not familiar with running this as a service. Would that be able to run 24/7 and not interfere with backups?
The latest version of OI is 9.4.4. So you could very well be several patches behind. I recommend fully patching your system first and then checking to see if indexing is working as expected.