Use query.get() to access objects by PK

Registered by Dolph Mathews on 2013-04-24

From the SqlAlchemy docs:

"get() is special in that it provides direct access to the identity map of the owning Session. If the given primary key identifier is present in the local identity map, the object is returned directly from this collection and no SQL is emitted, unless the object has been marked fully expired. If not present, a SELECT is performed in order to locate the object."

Source: http://docs.sqlalchemy.org/en/rel_0_7/orm/query.html

Related havana summit etherpad: https://etherpad.openstack.org/havana-keystone-performance

Blueprint information

Status:
Complete
Approver:
Dolph Mathews
Priority:
Low
Drafter:
Dolph Mathews
Direction:
Approved
Assignee:
Dolph Mathews
Definition:
Approved
Series goal:
Accepted for havana
Implementation:
Implemented
Milestone target:
milestone icon 2013.2
Started by
Dolph Mathews on 2013-05-01
Completed by
Dolph Mathews on 2013-05-20

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/sql-query-get,n,z

Addressed by: https://review.openstack.org/27881
    get SQL refs from session (bp sql-query-get)

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.