MySQL Forums
Forum List  »  Newbie

Sorting of data before query improves efficiency?
Posted by: Leo Leo
Date: June 08, 2016 08:06PM

Hi

I am storing large data into a table in Mysql from other source. However every time I append each monthly data to the table, the whole block gets appended below the table.

Example current table with the date as follows

20160330
20160229
..
20160201

Now, new monthly data is appended. Current table becomes

20160330
20160229
..
20160201

20160430
20160429
...
20160401

So you see the table is no longer in sequence with the date.

Also there would be chance when I load in an old block to current table. It would be appended to the bottom. Hence messing up the sequence in the table.

Do I need to sort them in orderly ie ascending order of dates and store them in the database so that next time I query, it will be faster ? If i do that, everything I load the data, I will have to sort them. It will be a very very large table.

Thanks

Options: ReplyQuote


Subject
Written By
Posted
Sorting of data before query improves efficiency?
June 08, 2016 08:06PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.