Hi,
I have a table with 3 fields:
Id: GUID stored in a char(40) column.
Index: stored in a integer column
PlainText: stored in a varchar(1000) column.
On this table I have the following index:
A metamorph inverted index on PlainText, Id, Index
and a unique index on Id, Index
We've build a C++ program that uses the Texis API to query the database.
Typical queries look like:
select PlainText from MyTable where Id in ( some Ids );
select PlainText from MyTable where Id = xxx and Index=xxx;
When we run searches on this table, the time it takes to respond varies greatly. At best it takes about 50ms, but at worst it can take several seconds!!!
Looking at the resources used, the program never grows bigger than a few MB where the table has above 400,000 rows and the index (.tok file) is about 30MB.
I have the feeling that it is not fully load the index in memory and instead, it keeps accessing the disk to get the information it needs. Do I understand it correctly?
If so, would loading the complete index (.tok file) in memory improve the performances? I have about 2GB of memory on my server so I could store some data there.
How could I do that?
Thanks,
/Tony.
I have a table with 3 fields:
Id: GUID stored in a char(40) column.
Index: stored in a integer column
PlainText: stored in a varchar(1000) column.
On this table I have the following index:
A metamorph inverted index on PlainText, Id, Index
and a unique index on Id, Index
We've build a C++ program that uses the Texis API to query the database.
Typical queries look like:
select PlainText from MyTable where Id in ( some Ids );
select PlainText from MyTable where Id = xxx and Index=xxx;
When we run searches on this table, the time it takes to respond varies greatly. At best it takes about 50ms, but at worst it can take several seconds!!!
Looking at the resources used, the program never grows bigger than a few MB where the table has above 400,000 rows and the index (.tok file) is about 30MB.
I have the feeling that it is not fully load the index in memory and instead, it keeps accessing the disk to get the information it needs. Do I understand it correctly?
If so, would loading the complete index (.tok file) in memory improve the performances? I have about 2GB of memory on my server so I could store some data there.
How could I do that?
Thanks,
/Tony.