Re: Custom Profile Fields
Reply #1 –
Question 1 makes sense. However question 2 touches on why it's important and why it's a problem.
The performance issue. A user's own profile fields are implicitly loaded with their theme options. Custom fields, not so much. But you don't necessarily incur extra queries because I don't know if you load other users' themes-table values in loadMemberData any more or not. ISTR this could happen in SMF. So then it's just about changing one query for another.
So, then: do you need to get anything out of themes for other users or is it just in profile view where you implicitly need both sets of data? If it's only in profile, only get them all in profile, and get only custom fields elsewhere.
As far as unions go, that's largely a legacy thing. Partly that SMF was built around MySQL 3.23 originally and UNION didn't appear until MySQL 4.0. Enforcing no-union was just a bonus. Secondarily, remember SMF 1.x didn't have a query layer, which means bad SQL injections were a risk - and union queries were a typical additional risk, since like subqueries they were ripe for abuse. These two issues are much less of a problem in 2.0, of course.
There is a side issue that the query viewer doesn't show you a link for the EXPLAIN of unioned queries.
Re: Custom Profile Fields
Reply #2 –
Thanks for tacking this. I think they'd better moved anyway, if only to clear up some of the unnormalized (and ugly) nature of the current structure.
On union, the above is pretty much how it is afaik: rather a "since we don't use union lets also secure against it", than anything else.
Re: Custom Profile Fields
Reply #3 –
thanks for the information and idea .... I'll dig in to this a bit deeper and see what I can come up with ....
Re: Custom Profile Fields
Reply #9 –
Season 7 won't be his last season, there's a much, much bigger event to come - since season 8 should be showing later this year... just in time for the 50th anniversary in November.
And yes, it's like tracking a chameleon but far from the worst of them. You wait until you decide to overhaul how post moderation, warnings and bans work. It's not pretty. Playing with it just somehow feels so fragile and like I really shouldn't be disturbing eldritch demons...