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

Key: COR-15
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Travis Reeder
Votes: 2
Watchers: 1
Operations

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

Query Optimization for descend into struct w/indexed field

Created: 25/Jul/06 05:50 PM   Updated: 04/Feb/09 04:50 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Order: 9
First Response Date: 29/Jul/06 12:35 PM
PSC Recommendation: B5
Labels:
Participants: Carl Rosenberger, Max Kosenko and Travis Reeder
Number of Attachments: 0
Number of Comments: 2


 Description  « Hide
public class ClassA{
    public StructA s;
    public int valueB
}

public struct StructA{
    int valueA; //indexed
}

Optimize the above case for:
q.descend("valueB").constrain(14).and(
    q.descend("s").descend("valueA").constrain(22));

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Max Kosenko - 29/Jul/06 12:35 PM
Think about the proposal I've made earlier - make structure fields be placed INSIDE object itself.
That could be done because struct always reserving memory. Also structure couldn't be inherited. So you can always treat structure fields as a fields of object holding structure. So that you can query in the style

q.descend("s.valueA").constrain(22);

just place struct fields inside object.

Carl Rosenberger - 22/Apr/07 09:43 PM
This has accidentally been marked as a bug, it is a suggested improvement.