I recently switched from using a local MySQL instance to using a Xeround MySQL instance for my C# application. As such, I've noticed that queries run much more slowly. I'm currently running a left join to create a new table and am trying to shave a few seconds off my run time.
I've observed the following average run times:
- CREATE TABLE AS (SELECT ): 14s
- CREATE TABLE & INSERT LEFT JOIN: 14s
- SELECT statement only: 9s
- CREATE TEMPORARY TABLE AS (SELECT ): 9.2s
- CREATE VIEW & Retrieve Contents: 9.5s
Currently I am running the CREATE TABLE AS (SELECT)
statement. Obviously, I would like to shave off the five second premium associated with moving from a select statement only, to a CREATE TABLE
with a select statement. Using views seemed promising, but accessing data from the view is extremely slow, and doesn't justify the time savings here. Using a temporary table also seems promising, but with the way that I am making my function calls, the table will get deleted before I finish accessing it. Is there another keyword I can use to tell the MySQL engine to take the contents of a SELECT
statement and put it into a barebones table?