On Dec 15, 2010, at 11:50 PM, Russell Warren wrote:

> 
> Ok again... but you also agree that the use of surrogate keys is
> standard (and some say "necessary") practice.  In the case of Sqlite
> (as in my example), adding this surrogate key automatically makes the
> schema "unreasonable" because you now need to have the primary key as
> the meaningless surrogate key (single id column), and the natural key
> ends up being relegated to just another unique index.  Unfortunately,
> the latter renders the object/table useless for use with the useful
> session.merge() function.  I don't recall the details, but I think
> there may be a similar PostgreSQL limitation regarding autoincrements
> as well.

Well that's only if you're trying to use merge() in some way where the objects 
you place in it ahead of time are "the same" based on unique keys but are not 
"the same" based on identity.     That's not an invalid use case but its beyond 
the scope of what merge() and the identity map is designed to work with, hence 
the external recipes.  With merge() you would typically pass in an object for 
the first time, get its .id back via flush or autoflush, then associate that 
.id with your unique key combination before continuing to merge() further 
objects.   Unique object is doing mostly this.

> Regarding RunSnakeRun, I've used it as well and like it.  However, I'm
> a bit of a resolution junkie and the box frames in RunSnakeRun's
> visual output are limited in how they will squish all the box borders
> together.  
> If you haven't given kcachegrind a shot yet for viewing
> cProfile results, you might want to give it a trial run as the visual
> output is a better representation of timing scale, and the viewing is
> more powerful as well (if resolution is too weak if an argument).
> Some tips to get it to work well for python are here:
> http://stackoverflow.com/questions/1896032/using-cprofile-results-with-kcachegrind

if i understand correctly i would imagine that same issue exists with any 
display of that type....I double click on a particular box to get a detailed 
view of everything inside of it.   kcachegrind seems to have the same kind of 
output in the lower left corner, if i can figure out how to run this on OSX ill 
give it a shot, thanks.



-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to