I have a local table with ~60k records in a Release 9 map file. Each record has a non-computed Geom field representing a point.
The table has an mfd_id field with a btree index on it.
The table has another field, "sample_id" which has a btreedupnull index on it. The Geom field also has an index of type rtree on it.
I am trying to "Select" (using the Select pane; not just "return via sql") only those points having "duplicate" sample_id.
With the Drawing component (based on the table's geom field) open, I open the "Expresion" tab on the "Select" pane, and paste-in the code below.
sample_id IN (SELECT sample_id
where sample_id IS NOT NULL
GROUP BY sample_id
The progress dialog that opens indicates that records are being scanned at a rate of ~25/s which is too slow for this workflow to be usable. For reference, the subquery using GROUP BY returns only a single record in this case, so it's not as if there is some cartesian product here that is too large to be processed.
I had a forum posting similar to this previously; I am struggling to "select" subsets efficiently in 9, and am motivated to improve my workflows. Thanks for the continued pointers on refining my techniques in 9.