Answer the question
In order to leave comments, you need to log in
How to display 50 necessary records from the database to millions?
async with request.app['db'].acquire() as conn:
result = await conn.execute(
select([db.my, ]).where(db.my.c.date == date)
)
a = await result.fetchall()
Answer the question
In order to leave comments, you need to log in
In general, in terms of speed, Limit is no different (well, almost) from a full SELECT. In your case sorting brakes. Try to index the field by which sorting will be carried out.
No way, if you immediately need data from the 100500th query line, there are cursors for the rest
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question