So I am creating a table from a view right now like this:
CREATE TABLE tableName SELECT * FROM viewName
Since there are some text fields in the view resultset, the query is quite slow.
I would like to create a memory table instead. But since memory tables do not support text fields in MySQL, I would like to convert all text fields to varchar fields when creating the table. How should I edit this SQL to do that? is that even possible?
I’m *very unfamiliar with MySQL at this point (just starting to learn it). You might however reference the MySQL syntax page for Create Table: http://dev.mysql.com/doc/refman/5.1/en/create-table.html. You’ll see that when creating a table you can specify column names and types i.e. CREATE TABLE t1 (col1 INT, col2 CHAR(5), col3 DATETIME). I’m guessing that if you declare these upfront the SELECTed data will be typecasted to the new datatypes. Good Luck!