pkundurthy/uwpyKepler — comment on commit b75d844436793910cf41461671fa5f4bb5c04fff
File:  line 0
By acbecker:

It might be slightly faster; have a look at it at the MySQL prompt. I'd just
use a "select count(*)" since then it just rolls through the index built on
KEPLERID, though I suppose when also looking at LCFLAG the count(*) might end up
being slower since it needs to access the resulting fields in the database.

Andy

On 11/7/11 3:38 PM, pkundurthy wrote:
> wouldn't selecting all data for a given KID be slower than just returning 1 entry (i.e. LIMIT 1)?
> this script is supposed to just check if a certain flag exists for a given KID:
>
> ```
> result = select KEPLERID from source where (KEPLERID = %s and LCFLAG = 0) LIMIT 1
> if len(result)>0:
> count += 1
> else:
> pass
> ```
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/pkundurthy/uwpyKepler/commit/b75d844436793910cf41461671fa5f4bb5c04fff#commitcomment-701329