Subject | Re: SELECT BLOB in a view |
---|---|
Author | Adam |
Post date | 2005-11-12T06:24:11Z |
--- In firebird-support@yahoogroups.com, "nikicab_1999"
<nikicab_1999@y...> wrote:
So providing MyBlob_id is indexed, it will fetch the correct record
right away. Primary keys and foreign keys are indexed by default.
Adam
<nikicab_1999@y...> wrote:
>Views generally use the same plan as the underlying queries.
> If I have a view (MyView) like
> SELECT myBlob_id, myBlob from MyTable
>
> and do SELECT * FROM MyView WHERE MyBlob_id=:id
>
> will there be any performance penalty i.e. will FB select all blobs
> from MyTable first and then filter it out to give me just one record
> OR will it give me the record right away?
>
> Thanks,
> Nick
>
So providing MyBlob_id is indexed, it will fetch the correct record
right away. Primary keys and foreign keys are indexed by default.
Adam