Jorge Godoy wrote:
> It is not a mistake but an optimization your might want to have:  
> there are no
> indices in your model.  If you use indices, then you'll be able to  
> get an
> answer for your queries much faster than without them.

Absolutely.  I just never got around to doing this :)  I just added  
project and creator indexes all over the place, but haven't really  
thought about any other indexes that I might need to add.  Any  
suggestions?

> I also try using sqlmeta and setting lazyUpdate to True, to avoid  
> contacting
> the database when each column changes.

I just make sure to use issue.set() instead of setting each column in  
separate assignments.  I don't like having to call "sync" ... it  
seems ugly.

> There's also an issue with threading and cache.  I don't know the  
> status of
> this implementation for TurboGears, but I believe you have to  
> disable caching
> by hand.

Well, the default server that I deploy with is single-threaded (but  
still very fast).  However, I do want to disable caching when running  
multiple load balanced instances.  I prefer to do this with  
configuration rather than in the code.

> And, finally, one last thing that might be appropriate here is  
> using CASCADE
> where it can be used.  For example, I can't delete a project that  
> has issues
> according to the above declaration.  This forces me to go to each  
> and every
> issue that belongs to one specific project, delete one by one and  
> then go back
> and delete the project itself.  If you add a "cascade = True"  
> attribute to
> your ForeignKey column, then you'll be able to delete the project  
> and either
> your RDBMS server or SQLObject will take care of deleting all  
> issues that
> belong to this project.  Similarly, using "cascade = False" will  
> prevent
> deletion from the other table leaving this one with orphan entries:

The one place that this would make sense in the current Fast Track  
code is questions/answers.  As of right now, there is no way to  
delete projects at all.  You can only "archive" them.  You can delete  
questions however, which needs to cascade to delete answers.  I will  
look into this.

> I hipe I helped a little -- or at least presented people here  
> something new

Thanks for the feedback, I really appreciate it!

--
Jonathan LaCour
http://cleverdevil.org



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to