Subject | RE: [firebird-support] How can I do INTERSECTS clause on IB/FB |
---|---|
Author | Hayashi@apex-jp.com |
Post date | 2003-06-16T02:56:04Z |
Thanks Helen
My question is wrong.
My problem is long *STRING* , not long time.
Every SQL string is very long. Is there better way?
Tsutomu Hayashi in Japan
Mail : hayashi@...
Web : http://www.apex-jp.com/ (Japanese Only)
http://dmj.psnet.ne.jp/ (Delphi Magazine)
My question is wrong.
My problem is long *STRING* , not long time.
Every SQL string is very long. Is there better way?
Tsutomu Hayashi in Japan
Mail : hayashi@...
Web : http://www.apex-jp.com/ (Japanese Only)
http://dmj.psnet.ne.jp/ (Delphi Magazine)
> -----Original Message-----
> From: Helen Borrie [mailto:helebor@...]
> Sent: Monday, June 16, 2003 11:49 AM
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] How can I do INTERSECTS clause on IB/FB
>
>
> At 11:11 AM 16/06/2003 +0900, you wrote:
> >Hi
> >
> >I have a question about INTERSECTS clause.
> >
> >Using Oracle:
> >
> >SELECT * FROM ATBL
> >INTERSECTS
> >SELECT * FROM BTBL
> >
> >Using IB/FB:
> >SELECT * FROM ATBL
> >WHERE EXISTS(
> >SELECT * FROM BTBL
> >WHERE ATBL.A=BTBL.A
> >AND ATBL.B=BTBL.B
> > .
> > .
> > .
> >);
> >
> >It is bery long. What is the better way?
>
> In principle, for a direct query, this should be the best way. A stored
> procedure would probably be faster but, if this query is slow because of
> unsuitable indexes, then a stored procedure would be slowed down
> by that as
> well.
>
> What are the numbers involved? (How many rows? are the rows very
> wide? How long does it take?)
>
> What indexes are available?
>
> I see dots in your sample code - what else is in this query? Do you have
> an ORDER BY clause? If so, are there indexes on the ordering columns?
>
> Can you show the plan that the query uses?
>
> Helen
>
>
>
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>