Click to See Complete Forum and Search --> : Need helping creating indexes to join 10 million+ table with others quickly


xvszero
10-21-2008, 12:46 PM
My experience with indexes is usually do this...

create index indexnamehere on tablenamehere(columnnamehere)

on the fields I am joining to other tables and voila, everything works fine.

But now I have to do a join between a table with a 10 million+ records and another with about 250k. And they have to be joined on two different columns, which combine to create one "unique" identifier. I set up the indexes the way I usually do, but when I actually try to do the selection everything just stalls up.

Any ideas?

chazzy
10-21-2008, 08:11 PM
try doing an explain on the query you're using first, see if it's actually using your new index or not.

xvszero
10-22-2008, 11:48 AM
What's an explain?!

Also, how fast can I reasonably expect this stuff to work anyhow? I'm used to getting responses in mere seconds, but then again I've never had a 10 million row table before.

chazzy
10-22-2008, 06:28 PM
what dbms?