0

I have a mysql database with some huge tables, i have a task that I must run three queries one after another and the last one exports to the outfile.csv.

i.e. Query 1. Select values from some tables with certain parameter. then write into a new table. aprox 4.5 hours

Query 2. After the first one is done, then use the new table join with another to get results to new table. Then write to outfile.csv. aprox 2 hours

How do I manage to automatically call these queries one after another even though one can take 4 hours to finish

I am open to any solution, Scripts, or database functions. I am running on ubuntu server so, no graphical solutions.

Thanks for your help.

1 Answer 1

2

you can just separate the queries with a semi-column and run them as a batch.

Sign up to request clarification or add additional context in comments.

2 Comments

I didn't understand the semi-column, could you give an example please.
select * from table1; select * from table2; select * from table 3;

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.