History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: COR-1446
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Carl Rosenberger
Reporter: Amphibian Toad@amphibian.dyndns.org
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
db4o Core

Constraining a field to null doesn't use the field index

Created: 31/Oct/08 03:37 PM   Updated: 03/Mar/09 03:19 PM
Component/s: Queries
Affects Version/s: 7.4.55
Fix Version/s: 7.8.84

Time Tracking:
Not Specified

Environment: 7.4.58, but it's not listed. Java. Debian lenny/sid.
Issue Links:
Resulted
 

Peers: Patrick Roemer
Order: 3
Iteration: 84
Original IDS Estimate: 3
Resolution Date: 02/Mar/09 10:31 AM
Labels:
Participants: Amphibian Toad@amphibian.dyndns.org and Carl Rosenberger
Number of Attachments: 0
Number of Comments: 0


 Description  « Hide
Our class:
PersistentBlobTempBucketTag {
...
PersistentBlobTempBucket bucket
}

Set up indexes:
...
dbConfig.objectClass(freenet.support.io.PersistentBlobTempBucketTag.class).objectField("bucket").indexed(true);

Do the query :

Query query = container.query();
query.constrain(PersistentBlobTempBucketTag.class);
query.descend("bucket").constrain(null).identity();

(Setting and() with the subconstraint doesn't change anything, identity() makes it OOM a bit later).

As you can see, the query is executed by instantiating every object:

28070016 219297 com.db4o.internal.query.processor.QCandidate
22075352 212263 com.db4o.internal.ObjectReference
12734656 198979 freenet.support.io.PersistentBlobTempBucket
11886840 212265 com.db4o.internal.ActiveObjectReference

Eventually this causes an OutOfMemoryException, as well as being a major performance cost.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.