Subject | RE: [firebird-support] Two queries - 1 good performance + 1 poor performance? |
---|---|
Author | Leyne, Sean |
Post date | 2011-07-26T16:48:24Z |
What happens if you try:
ca.id,cn.firstname,cn.lastname,cn.email1,cn.dateofbirth, ca.kind,ca.category,ca.status,cn.name
from person cn
JOIN extendedperson ca on ca.personid=cn.id
where (upper(cn.name) starting with 'S')
Do you have an index on cn.name?
Sean
> (B1) person query - slow (11-12 secs, ~2000 rows)Select
> select
> ca.id,cn.firstname,cn.lastname,cn.email1,cn.dateofbirth,
> ca.kind,ca.category,ca.status,cn.name
> from extendedperson ca
> join person cn on ca.personid=cn.id
> where (upper(cn.name) starting with 'S')
ca.id,cn.firstname,cn.lastname,cn.email1,cn.dateofbirth, ca.kind,ca.category,ca.status,cn.name
from person cn
JOIN extendedperson ca on ca.personid=cn.id
where (upper(cn.name) starting with 'S')
Do you have an index on cn.name?
Sean