Intent: I just told you.

 
Mclaurin: You seem to have unlimited time at your disposal based on todays effort.

Finizio: It wouldn’t be enough.

Allio: Intent: Your current costs are very high. It might help to consider reducing that significantly.

Putman: That’s the price of thinking about design this late in the process.

Clausi: I know it’s a heavy script, but it would take months and months to restructure all of the functions depending on just this one column. It just isn’t worth it, to save a bit of processing

Brocklebank: What I’m working on now, is an administrative function, so it most it runs once an hour via Cron. It’s not that big a hit, just wondering if it can be optimized

Mylar: Intent: I suspect this isn’t the only problem. But this one problem seems to be a significant problem.

Czajkowski: This isn’t even close to the only problem.

Aboytes: Although that’s partly what I mean-there’s so much more that higher priority.

Gertel: Intent: Optimized? What more could you do to make it worse?

Rei: Xgc: I could make the delimiters be percentage signs and underscores

Jimeno: Intent: Of course there’s room for improvement. The question is more about what you feel like doing.

Bullington: Xgc: I mean in the query. At the moment, I have nine different values I need to search for in the group ID columns. That’s 27 conditionals using that structure.

Kainz: Intent: You should probably just live with it as is until you’re ready to make proper changes.

Brabston: Intent: You haven’t shown the exact SQL. It’s tough to comment.

Busa: Xgc: this is what each query would look like: http://pastebin.com/Rpie8FkB

Cabarcas: Ideally, I could reduce the redundancy in those last three that get repeated over and over

Bakr: There are three of them for each value, because they handle the different comma placements that have to be matched

Rumery: Intent, you might write a bit of sql to expand those comma separated lists to a temporary table and use that in next query

Charlson: Hi guys, i need a bit of help with a query, output of size is in KB. need to get it to GB. select name,id,account_id,domain_id,pool_id,size from volumes where removed is NULL and state=’Ready’ and volume_type=’DATADISK’ and attached is NULL;

Rumery: Sendro, like “size/1024/1024 AS sizeGB” ?

Heflin: Rumery: exactly like : thanks .

Neiswender: One more thing, if i wanted to add up the size of all the rows to show total”?

Buteaux: Sendro: See http://dev.mysql.com/doc/refman/5.6/en/select.html

Guevana: Look at the ‘with rollup’

Amejorado: Or same query except select sumsize/1024/1024 as sizeGB from volumes .

Gasper: Thanks guys, my mysql sux. if that makes sense

Shapino: Intent: Can you change the data?

Vogl: Intent: Can you change the membergroupids data to have a leading and trailing ‘,’ in every list? Instead of storing ‘1,2,3,4,5’, store, ‘,1,2,3,4,5,’

Greep: Intent: Otherwise, you could do that in the query directly.

Couse: Intent: WHERE CONCAT’,’, us.membergroupids, ‘,’ NOT LIKE ‘%,3,%’ . that would replace the 3 expressions.

Calles: Intent: No need to treat the first and last item separately.

Cyganiewicz: Intent: If you update the list to contain those commas, you don’t need the CONCAT within the query.

Wildsmith: Intent: Also see FIND_IN_SET

Jessica: Intent: WHERE NOT FIND_IN_SET’3′, us.membergroupids;

Herout: Intent: Until you change the design, that’s about all of your options.

Lashmet: Xgc: there no errors if I have commas before and after the numbers, but unfortunately it’s not feasible because I need to change it at every function that changes that column. so I guess all have to live with it. I will look intoFIND_IN_SET

Gatto: Intent: I just told you that you don’t need to change the data. But then you either need to use FIND_IN_SET or CONCAT.