Thanks Mark!
one more thing is that: is drools using some special join algorithms
(like star-join) in this case? or there is always one join algorithm
in drools?
Thanks again,
Senlin
On Thu, Oct 16, 2008 at 1:02 AM, Mark Proctor <mproctor(a)codehaus.org> wrote:
Senlin Liang wrote:
My test query is
result(Index, PaperName, Author, Year, Month) :-
paper(Index, name, PaperName),
paper(Index, author, Author),
paper(Index, year, Year),
paper(Index, month, Month).
So drools builds alpha-hashing on the 2nd argument, and name-hashing
on the 1st argument.
Drools performs much more better than XSB/YAP for this query, and I am
trying to figure out what is the reason behind.
I don't know the implementation details for XSB or YAP, so not much more I
can add other than what I've already said. Can't say it simpler than we hash
literal constraints and index variable constraints.
Mark
Would you share some ideas?
Thanks,
Senlin
On Wed, Oct 15, 2008 at 5:40 PM, Mark Proctor <mproctor(a)codehaus.org> wrote:
Senlin Liang wrote:
Thanks Mark!
I got another question: what kind of indexing is used in drools? what
field does it index?
It wil index the field used in the constraint
Person( name == "mark" )
Person( name == $var )
Both of those pattners will be indexed no the name field, the first is what
we call alpha node hashing, as it's on a literal and the latter is join node
index on the name field.
I checked the online manual, it seems that I uses hashing index, but i
am not sure the details.
The reason that I am asking this question is that: drools runs really
faster for one of my program. In this program, there is information
about DBLP publications:
a(primary key, property, values), where primary key is the primary
key of one publication, property can be one of "author, year, ...",
and value is the value of the property. I run the query by joining the
tables together using the primary key. Drools runs really fast for
this program.
I am wondering whether there is anything behind to make drools fast.
Senlin
On Wed, Oct 15, 2008 at 3:41 PM, Mark Proctor <mproctor(a)codehaus.org> wrote:
Senlin Liang wrote:
One more question: does drools index intermediate results (such as the
inserted objects in actions)?
Any inserted object used in == constraints is indexed for that constraint.
Is there any cost-based optimization for queries?
no
Thanks
On Wed, Oct 15, 2008 at 9:10 AM, Senlin Liang <senlin.liang(a)gmail.com>
wrote:
Hi all,
I got one question: How does drools index the objects in memory? Does
it use hashing index, based on what? Or drools uses adaptive indexing?
Thanks a lot,
Senlin
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users