Hi all, This is sort of a general db question I was wondering about. So, I'm trying to write a small blog system (not using the mapper, only sql queries written on my own until now) and I am not sure:
Say, I want to show one blog post and all the comments for that blog entry (one-to-many). I know the post_id (from the get-parameter of the request). Is it faster to do: a) 2 separate select-queries? One query going like: "SELECT * from blog_posts WHERE post_id = my_post_id" and the other sth. like "SELECT * from comments WHERE parent_id = my_post_id". b) one join-query? Joining the two tables over my_post_id, so I only need 1 sql-query? I'd appreciate some help, since I don't have all that much db- experience. Cheers, Martin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---