Advertisement

09.11.2007 at 05:02PM PDT, ID: 22822148 | Points: 500
[x]
Attachment Details

MySQL - 15 million rows or 300,000 tables : Which is a better choice?

Asked by 1_21gigawatts in MySQL

Tags: mysql, rows

I am working with a mysql database of stock market transactions. I currently have a table for each day's ticks. There are approximately 14 million ticls per day, hence each table has about 14 million rows.

I have indexes on SerialNumber (bigint unique) and Symbol (varchar 20).

Executing a simple query like
  Select datetime FROM ticks WHERE symbol='ibm';
returns about 6000 rows, but can take up to 20 seconds to execute. Running the same query again executes almost instantly, suggesting that the results are buffered.

What can I do to make this faster?

  I have considered separating the more active symbols into a separate database, or even using a table per symbol. This would almost certainly make the queries faster, but at the expense of having a huge number of tables - there are, including futures and options, some 300,000 symbols. Most of them have little or no data, but all of them have to be accomodated.

I suppose I could have a table with pointers to which table contains the actual data, only having entries for the more active issues which would be stored in separate tables. If a symbol doesn't have an entry in this index, then its data is stored in the main table.

I guess a question that needs to be answered is how many tables is too many tables?

This, by the way is running on Windows XP with a Raid 0 array.  Core 2 Duo Processor, 2G ram, and the computer is not doing much other than running this database and collecting data from our service.

These are, by the way, MyISAM tables.

It just seems to me that this should run faster.

Any suggestions? And, while we're at it, would this work better in MS SQL server?Start Free Trial
[+][-]09.11.2007 at 05:14PM PDT, ID: 19873069

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 05:33PM PDT, ID: 19873120

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 05:36PM PDT, ID: 19873136

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 05:44PM PDT, ID: 19873161

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 05:53PM PDT, ID: 19873190

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 05:55PM PDT, ID: 19873194

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 06:00PM PDT, ID: 19873210

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 06:09PM PDT, ID: 19873234

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 06:16PM PDT, ID: 19873256

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 06:17PM PDT, ID: 19873260

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 06:33PM PDT, ID: 19873330

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 06:40PM PDT, ID: 19873360

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 06:42PM PDT, ID: 19873369

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 06:49PM PDT, ID: 19873403

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 07:03PM PDT, ID: 19873450

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 07:08PM PDT, ID: 19873457

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.11.2007 at 07:26PM PDT, ID: 19873503

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.13.2007 at 05:49PM PDT, ID: 19888259

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.14.2007 at 02:50AM PDT, ID: 19890041

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.14.2007 at 04:22PM PDT, ID: 19895740

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.14.2007 at 04:48PM PDT, ID: 19895841

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.14.2007 at 05:29PM PDT, ID: 19895975

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.14.2007 at 05:53PM PDT, ID: 19896040

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.03.2008 at 02:08PM PDT, ID: 22382001

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628