[MarkLogic Dev General] cts:search / geospatial queries - combining criteria
Alex Milowski
alex at milowski.com
Sat Jun 30 21:05:20 PDT 2012
On Sat, Jun 30, 2012 at 2:25 PM, Michael Blakeley <mike at blakeley.com> wrote:
> If you are familiar with RDBMS join terminology, the idea behind the change I suggested was to move from a nested-loop join to an index-based value join.
>
OK. The index-based value join that I really want to do is between
the id of the weather station located by the geospatial index and the
id of the weather report. I have indices for both.
I don't quite know how to specify that join using the query constructs
of MarkLogic.
The previous version of this did something similar but it use the
geospatial index on the weather reports. It was recommended to me
that I avoid having such a large geospatial index but it hasn't paid
off so far. That is, the only geospatial index index-based join
between the weather reports that matched a geospatial region and the
time periods I'm interested is outperforming the newer query. I'm not
that surprised given that I've left the cts:search realm to use
regular predicates in XQuery to match by id and then by time period.
Keep in mind that both the id-based comparison and time period
predicates use the indicies. I've looked at the query plans. They
just aren't doing it all together as a single cts:search might do.
...and then I do the above 10368 times for separate geospatial regions
(quadrangles of 2.5 degrees each).
--
--Alex Milowski
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."
Bertrand Russell in a footnote of Principles of Mathematics
More information about the General
mailing list