Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Full table scan on attribute query when attribute is indexed

Doooh!!!!   Thanks.   I should have seen that.


On 7/13/17 8:41 AM, Emilio Lahr-Vivaz wrote:
I believe we hit something like this before - the EQUALS predicate you're using is not what you think it is. Can you try using 'ff.equals' instead of 'ff.equal'? The later is org.opengis.filter.spatial.Equals, which only operates on geometries, the former is org.opengis.filter.PropertyIsEqualTo, which is what you want.

Thanks,

On 07/13/2017 05:29 AM, David Boyd wrote:

Emilio
All:

   Just got a strange issue.   I have a fairly large featuretype (>8M).
In my code I am looking to delete a given feature using this code:

        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2();
SimpleFeatureStore featureStore = (SimpleFeatureStore) store.getFeatureSource(LINKAGE_FEATURE_NAME); Filter filter =ff.equal(ff.property(LINKAGE_ENTITY1_KEY_COLUMN_NAME),ff.literal(entity.getKey()));

        featureStore.removeFeatures(filter);
My describe schema on the type gives:

[root@bdpgeoserver geomesa-accumulo_2.11-1.3.1]# bin/geomesa describe-schema -z bdpnode4 -i rdk -u root -c CoalesceSearch -f Linkages
Password (mask enabled)>
INFO  Describing attributes of feature 'Linkages'
objectKey      | String
entity1Key     | String  (Attribute indexed - join)
entity1Name    | String
entity1Source  | String
entity1Version | String
entity2Key     | String  (Attribute indexed - join)
entity2Name    | String
entity2Source  | String
entity2Version | String
lastModified   | Date    (Spatio-temporally indexed)
label          | String  (Attribute indexed - join)
linkType       | String  (Attribute indexed - join)
theWorld       | Polygon (Spatially indexed)

User data:
  geomesa.index.dtg            | lastModified
  geomesa.indices              | records:2:3,attr:4:3
  geomesa.table.sharing        | true
  geomesa.table.sharing.prefix |
But it get this log message for each delete:

2017-07-13 09:27:32,976 | WARN | [main] | (IdIndex.scala:77) - Running full table scan for schema Linkages with filter EQUALS(entity1Key, 'd01bb4ac-86ec-4035-86f2-1da765d1e3e9') 2017-07-13 09:27:32,977 | WARN | [main] | (IdIndex.scala:87) - Running full table scan for schema Linkages with filter EQUALS(entity1Key, 'd01bb4ac-86ec-4035-86f2-1da765d1e3e9')

Needless to say each one of these deletes is taking 20-30 seconds.

Thoughts?


_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.locationtech.org/mailman/listinfo/geomesa-users

--
========= mailto:dboyd@xxxxxxxxxxxxxxxxx ============
David W. Boyd
VP,  Data Solutions
10432 Balls Ford, Suite 240
Manassas, VA 20109
office:   +1-703-552-2862
cell:     +1-703-402-7908
============== http://www.incadencecorp.com/ ============
ISO/IEC JTC1 WG9, editor ISO/IEC 20547 Big Data Reference Architecture
Chair ANSI/INCITS TC Big Data
Co-chair NIST Big Data Public Working Group Reference Architecture
First Robotic Mentor - FRC, FTC - www.iliterobotics.org
Board Member- USSTEM Foundation - www.usstem.org

The information contained in this message may be privileged
and/or confidential and protected from disclosure.
If the reader of this message is not the intended recipient
or an employee or agent responsible for delivering this message
to the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication
is strictly prohibited.  If you have received this communication
in error, please notify the sender immediately by replying to
this message and deleting the material from any computer.



Back to the top