Subject | RE: [firebird-support] Re: Performance issue |
---|---|
Author | Leyne, Sean |
Post date | 2008-02-18T18:57:53Z |
Pokka,
select
DOC.DOC_ID,
DOC.DOC_TYPE,
DOC.DOC_SUBTYPE,
DOC.DOC_DATE
from doc
where
doc_id=1000
order by
doc_id
Separately, you know that your ORDER BY clause is redundant/should be
dropped, right?
The DOC_ID is unique, so sorting by the field is simply adding an
extra/unneeded step.
Sean
> For the 1st SQL after starting FB, the statistics is as follows:What is the performance of the following SQL?
>
> Starting transaction...
> Preparing query: select * from doc where doc_id=1000 order by doc_id
> Prepare time: 00:00:05.
> Field #01: DOC.DOC_ID Alias:DOC_ID Type:INTEGER
> Field #02: DOC.DOC_TYPE Alias:DOC_TYPE Type:INTEGER
> Field #03: DOC.DOC_SUBTYPE Alias:DOC_SUBTYPE Type:INTEGER
> Field #04: DOC.DOC_DATE Alias:DOC_DATE Type:DATE
> Field #05: DOC.DOC_XML Alias:DOC_XML Type:BLOB SUB_TYPE 1
> PLAN (DOC ORDER PK_DOC INDEX (PK_DOC))
>
select
DOC.DOC_ID,
DOC.DOC_TYPE,
DOC.DOC_SUBTYPE,
DOC.DOC_DATE
from doc
where
doc_id=1000
order by
doc_id
Separately, you know that your ORDER BY clause is redundant/should be
dropped, right?
The DOC_ID is unique, so sorting by the field is simply adding an
extra/unneeded step.
Sean