
@Ndwex, nope, I am not duplicating table structure. I am following something I heard from some Facebook engineering video "store the data in the state its going to be used". The actual SELECT I use from my_table_b is a little bit more complicated. Like I mentioned, its a particularly nasty piece of SQL which takes 40 seconds to run, and does some calculations and transformations that honestly gives me headaches. And then you raise something interesting... A colleague once challenged me to practically and factually show him why *SELECT column_a, column_b, column_c FROM some_table *is better than *SELECT ** *FROM some_table*. EXPLAIN and EXPLAIN EXTENDED didnt show me any difference between the two. On Thu, Oct 24, 2013 at 12:31 PM, Ken Muturi <muturiken@gmail.com> wrote:
I think peter is trying to have data from one table to another table but in a different format. Perhaps the one table is a Key => value but now wants to create a linear/structured table with some of key/values. some kind of PIVOTING. Mysql does it by MAX CASING. (I have been there.) .
@Nd'wex => a view may not be appropriate probably because of performance (in a view u will just be running the same query again and again from the parent.) which i suppose peter is why he is creating the next table because of performance issues.
On Thu, Oct 24, 2013 at 12:22 PM, Nd'wex Common <flexycat@gmail.com>wrote:
@peter looking at the query seems like you are duplicating a tables structure and copying the respective record which in turn brings up the arguments by nelson (above) why not create a view?
tip: select * is more hungry resource wise that select id
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
-- Regards, Peter Karunyu -------------------