Hi,
I have the following table:
DocId => char(50)
PageIndex => Integer
Binary => Blob
PlainText => varchar
The table may contain up to 10M lines.
That table is frequently queried to return the most relevant page of a document. I use this query for that:
Select max(rank), PlainText from table where PlainText like 'xxx' and DocId='YYY' group by DocId
The table are also frequently modified: typical changes include:
Delete all records with Id = xxx
Set Id= xxx where Id=yyy
Add new files.
Which indexes would you recommend for that table?
How can I monitor the performance of sql statements to detect which one are costly?
Thanks,
/Tony.
I have the following table:
DocId => char(50)
PageIndex => Integer
Binary => Blob
PlainText => varchar
The table may contain up to 10M lines.
That table is frequently queried to return the most relevant page of a document. I use this query for that:
Select max(rank), PlainText from table where PlainText like 'xxx' and DocId='YYY' group by DocId
The table are also frequently modified: typical changes include:
Delete all records with Id = xxx
Set Id= xxx where Id=yyy
Add new files.
Which indexes would you recommend for that table?
How can I monitor the performance of sql statements to detect which one are costly?
Thanks,
/Tony.