Subject | RE: [firebird-support] Re: Query runs 9 minutes - how to set indexes to optimize it |
---|---|
Author | Mercea Paul |
Post date | 2008-08-04T08:31:47Z |
I think best approach is to redesign the database adding new fieldTRUE (0,1)
to thet table (BusinessCl_3) and select likeĀ
Select * from table where exists (select 1 from t2 where table.id=t2.id and
t2.fieldTRUE=1)
Best regards,
Paul
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Alexandre Benson
Smith
Sent: Monday, August 04, 2008 8:19 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Re: Query runs 9 minutes - how to set
indexes to optimize it
Mercea Paul wrote:
It does not matter...
A IN (1, 2, 3)
or
A = 1 or A = 2 or A = 3
is exactly the same...
I can't even read that create statement to sugest anything :)
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
to thet table (BusinessCl_3) and select likeĀ
Select * from table where exists (select 1 from t2 where table.id=t2.id and
t2.fieldTRUE=1)
Best regards,
Paul
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Alexandre Benson
Smith
Sent: Monday, August 04, 2008 8:19 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Re: Query runs 9 minutes - how to set
indexes to optimize it
Mercea Paul wrote:
> Try to modify:Paul,
>
>
>
> WHERE IwadisObje_1.BOLD_ID = IwadisObje_6.BOLD_ID
> AND ((((((((((((((((((((BusinessCl_3.iwadisID = '68D3C5EE-8EDC-4E5C-
> BA90-88D495596910') or (BusinessCl_3.iwadisID = '9B58C591-3FF4-4E14-
> A9E0-F2EE49F4844E')) or (BusinessCl_3.iwadisID = '8374F54C-A890-4537-
> B343-A7F55C5DC060')) or (BusinessCl_3.iwadisID = 'C8A7D593-B28B-4A31-
> 94A6-E6C7367CA8CF')) or (BusinessCl_3.iwadisID = '6B590600-C19C-4678-
> B073-5BE22776C744')) or (BusinessCl_3.iwadisID = '549E4270-5532-48EF-
> 9311-61D3EA92F22E')...
>
>
>
> In this one
>
>
>
> WHERE IwadisObje_1.BOLD_ID = IwadisObje_6.BOLD_ID
> AND ((((((((((((((((((((BusinessCl_3.iwadisID IN ( '68D3C5EE-8EDC-4E5C-
> BA90-88D495596910', '9B58C591-3FF4-4E14-
> A9E0-F2EE49F4844E', '8374F54C-A890-4537-
> B343-A7F55C5DC060', 'C8A7D593-B28B-4A31-
> 94A6-E6C7367CA8CF', '6B590600-C19C-4678-
> B073-5BE22776C744' , '549E4270-5532-48EF-
> 9311-61D3EA92F22E').......
>
>
>
> Regards,
>
> Paul
>
It does not matter...
A IN (1, 2, 3)
or
A = 1 or A = 2 or A = 3
is exactly the same...
I can't even read that create statement to sugest anything :)
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br