Opened 11 years ago
Closed 10 years ago
#617 closed enhancement (invalid)
rasql insert within an MDD object
Reported by: | Dimitar Misev | Owned by: | Dimitar Misev |
---|---|---|---|
Priority: | major | Milestone: | Future |
Component: | qlparser | Version: | development |
Keywords: | Cc: | Piero Campalani, Peter Baumann | |
Complexity: | Medium |
Description (last modified by )
Inserting a slice in the middle of a 3D cube is possible via a partial update, e.g.
UPDATE 3Dcube AS c SET c[ 5:*, *:*, *:* ] -- assuming shift position 5 in dimension 0 ASSIGN shift( c[ 5:*, *:*, *:* ], [1,0,0] )
The problem is that this is inefficient, as it requires updating a lot of data. This could be implemented efficiently without moving any data but just shifting some tile OIDs in the index.
Change History (8)
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
Description: | modified (diff) |
---|
comment:3 by , 11 years ago
Description: | modified (diff) |
---|
comment:5 by , 11 years ago
Hey this actually works! I didn't expect it Note in the shift you need a trim as well:
UPDATE 3Dcube AS c SET c[ 5:*, *:*, *:* ] -- assuming shift position 5 in dimension 0 ASSIGN shift( c[ 5:*, *:*, *:* ], [1,0,0] )
We just need to make this efficient, so that it doesn't require actual movement of the data.
comment:6 by , 11 years ago
Description: | modified (diff) |
---|
comment:7 by , 11 years ago
…but care has to be taken that the tiling scheme is not violated. An interesting optimization problem: do the data shift with minimal tile updates in presence of some given tiling scheme.
comment:8 by , 10 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
I think such an optimization will not be possible in the general case, as the target domain can already have some data which needs to be overwritten, so moving just the index entry will not work. Closing ticket therefore.
INSERT is used for inserting aon (oid,array) tuple, so such functionality would fit into partial UPDATE instead.
Isn't this already doable through something like
or, in one query: