This content has been marked as final. Show 4 replies
With the indexes on get_subject(), get_property(), and to_char(get_object()) the query should work efficiently. Did you use to_char while creating the index on get_object() as well?
What is the size of your data, and what is the time taken that you are observing?
Thank you for your quick response.
For now, in our database I have 3217995 triples.
I have used to_char creating the index on get_objcet().
Every object like "http://www.aaaa.bbbb.com.ee/TTTT#....", maybe this is the reason for filting, it took 10 mins to get a result.
I have solved this problem just now.
The reason for filting is I have not statistics for this table,the three indexes have not been used,the SQL statement was running on full table scan.
So,I created CBO statistics for the table. Then it only took 0.01 seconds to get a result.
That was the next thing I was going to ask - whether you had generated statistics :)