Jump to content

10 gb database select queries


rotastrain

Recommended Posts

Hey people

 

i would really appreciate advise on this

 

i have a 10gb database

2 fields

 

idno int primary key

text longtext

 

i need to run a simple select on this table

 

select text from corob where idno in (1,2,3,4,5,6,7,8......upto thousand idnos)

 

right now when i run this query it takes about 15 seconds

 

is there any way what so ever to make this go faster.

 

can i load something into ram?make some buffer larger?make some log?anything?

 

also here is my explain

 

id  select_type  table  type    possible_keys  key        key_len    ref      rows  Extra 

1  SIMPLE        gold    range    PRIMARY      PRIMARY    4            NULL  1000  Using where

 

 

thank you for your help

 

rota

 

Link to comment
Share on other sites

Well, that depends on how much data you're returning -- in terms of phsyical size.

 

If the resultset doesn't fit into memory, that's not ideal.

 

But if you're returning GBs of data via a network datastream, you're limited by lots of other things.

Link to comment
Share on other sites

it probably takes 15 seconds to return results because phpMyAdmin not only has to perform a query, but it also has to render a page, and if you paginate the page and are on page like 1000 it will probably return results even slower.

 

if you run your query via command line, you will see that results return MUCH faster than phpMyAdmin, because it doesn't have to render a web page with the results.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.