Joey
Joey

Reputation: 93

Knowing length of query without having to index and execute potential slow query (with firebird db, executing query with fdb cursor in python)

What should be another alternative from indexing, if I want to quickly know the length of the query first before executing a potential slow query (such as multiple regions with a long date range)?

Indexing query, Counting with subquery of query, Ways to make compress query

crs.execute(query) #from fdb cursor

if crs.fetchone() is None:
   #notify user there is no results
else:
   #do stuff

I want to notify user quickly if there is no results in query instantly/faster.

Upvotes: 0

Views: 100

Answers (0)

Related Questions