Performance difference between 1 query returning n records and n queries returning 1 record?
With respect to Amazon SimpleDB,
Is there any significant performance difference between
select * from mydomain where itemName() in('id1','id2','id3', 'id4')
and
select * from mydomain where itemName() == 'id1'
select * from mydomain where itemName() == 'id2'
select * from mydomain where itemName() == 'id3'
select * from mydo开发者_JAVA技巧main where itemName() == 'id4'
Starting four whole new queries might be slower than running one which is only a little bit more slower compared to any of the other four.
精彩评论