i used pymysql in my server with mysql
and the table has about 0.2 billion rows and multi PK (suppose that a, b, c col)
when i use pymysql with "SELECT * FROM table WHERE a='0' and b='1', and c='2'" query
it tooks about 40~60 sec.
but when i use sqlalchemy like
session(Table).filter(Table.a=='1', Table.b='1', Table.c='2')
it tooks about 0.00002 sec
so i changed pymysql to sqlalchemy.
but i want to know why this case happend..
plz help me