On 09/03, Sean McGinnis wrote: > > > On Mar 9, 2018, at 07:37, TommyLike Hu <[email protected]> wrote: > > > > Thanks Gorka, > > To be clear, I started this discussion not because I reject this > > feature, instead I like it as it's much more clean and simple, compared > > with performance impact it solves several other issues which we hate badly. > > I wrote this is to point out we may have this issue, and to see whether we > > could improve it before it's actually landed. Better is better:) > > > > > > - Using a single query to retrieve both counts and sums instead of 2 > > queries. > > > > For this advice, I think I already combined count and sum into single query. > >
Yes, but we would be doing 2 count and sum queries, one for the volumes and another one for the per volume types, the idea I was proposing is doing just 1 query for both calculations, that way even if you increase the payload of the response from the DB you are getting rid of a round trip to the DB as well as a pass through all the volumes for the volume type. > > - DB triggers to do the actual counting. > > > > Please, no DB triggers. :) > > > This seems a good idea, but not sure whether it could cover all of the > > cases we have in our quota system and whether can be easily integrated into > > cinder, can you share more detail on this? > > > > Thanks > > TommyLike > > > As a general rule I agree with Sean that it's better to not have triggers, but I wanted to mention them as an alternative in case we really, really, really have problems with the other alternatives. Cheers, Gorka. __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
