0

Is there a more appropriate or faster way to do the equivilant of the following query in MySQL? The table I'm querying has billions of rows and some of the fields I pull are large TEXT fields. Something still seems slow about it to me though. Just going on a hunch.

SELECT field1, field2, fieldn
FROM table
WHERE data_id IN (1,2,3,4,5,6,10,42,420,666,...);

data_id has a non-unique index on it and actual query time is very fast (hundreds of milliseconds).

Could this be a disk issue because I'm essentially pulling random TEXT fields from a table that can't possibly be in memory? Any way to address that?

Could this be a network/communication issue simply because I'm returning thousands of full pages of text in some of these fields?

Thoughts / Suggestions / Questions?

T. Brian Jones
  • 13,002
  • 25
  • 78
  • 117

0 Answers0