I have a MyModel object which inherits from Model from SQLAlchemy. Accessing the primary key (ID) seems to take much longer than any other attribute:
value = getattr(model, ID)
takes ~1.4ms to compute or get the value of but,
value = getattr(model, <any_other_column>)
takes exponentially less time to get the value of that column no matter what type it may be? Is there a faster way to get the primary key value from a Model object?