Subject Re: [firebird-support] Re: Query plans and joins
Author Martijn Tonies
Hello Filip,

> >Then don't ask for them "all at once" :-)
>
> >Seriously, you're asking the server for a complete resultset which
> >needs to be prepared.
>
> SELECT FIRST 1
> A.*,
> B.DESCRIPTION
> FROM
> TEST_DETAIL A
> /*
> LEFT JOIN
> */
> INNER JOIN
> TEST B
> ON
> B.ID = A.FID
> ORDER BY
> A.CODE,A.VNR
>
> I added FIRST 1 to both queries and got the same results. The left
> join is slow because it doesn't use UC_TEST_DETAIL_CODE_VNR and i
> would like to know why?

In order to get the first record, you first have to get them all, don't you?
Else,
how would you know which record is the first one :-)

> >He sure does.
>
> U got his addy, mine seems offline a loooong time ago :)

nttp://newsgroups.firebirdsql.info

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com