Why did you say cartesian join here?
Reji, February 12, 2006 - 6:03 pm UTC
Tom:
Would you please explain why do u think that i am doing a cartesian join here?
February 13, 2006 - 8:06 am UTC
"U" - he or she never commented on the issue??
You join O to OP
You caresian product that join to both:
select * from ol where organizationLevel = 3
and
select * from t where actualDate = 'a very bad string'
Why a Cartesian?
Duke Ganote, February 12, 2006 - 8:48 pm UTC
Reji-- Because you have 4 tables and only 1 join condition specified:
FROM
dbo.F_OrganizationProfileDaily op,
dbo.Organization o,
dbo.OrganizationLevel ol,
dbo.TimeDay t
WHERE
o.OrganizationID = op.D_OrganizationID
There are filter, but not join, conditions for ol and t:
AND ol.OrganizationLevel = 3
AND t.ActualDate = '2004-07-04'
so they form a Cartesian join. Perhaps this is OK if your filter conditions result in only 1 row for those tables, but it seems suspicious.
Very good explanation
Reji, February 13, 2006 - 9:40 am UTC
Duke Ganote:
Thanks for your detailed explanation. I will look at the query and see how i can make some changes to improve the performance.
Sequence
Bhavin, March 08, 2006 - 10:40 am UTC
Hi Tom,
One sequence of defination is as below.
CREATE SEQUENCE RMPUSER.PROJECTS_SEQUENCE
START WITH 31
MAXVALUE 999999999999999999999999999
MINVALUE 1
NOCYCLE
CACHE 20
NOORDER;
Now this sequence has been in jump from 10 to 31 as per table where it inserts its value.
My concern is if any activity occuer which flush cache like db restart then it should be start with 21, 41 like that. But it has been started with 30.
It might be that user could use it but it deleted that row. This is also not possible since application is doing soft delete means updating delete flag since it's app requrement.
One more reason, it also not possible to remove some values using "SELECT PROJECTS_SEQUENCE.NEXTVAL FROM DUAL"
but this password has been share with me and web develper lead.
Now can you enlighten me how can I analyse where these number (11 to 29) has been lose.
Regards
Bhavin
March 09, 2006 - 12:30 pm UTC
the use of sequences implies one thing:
YOU WILL HAVE GAPS
period, they are 100% unavoidable - period.
they are expected, they will happen, don't worry about it, it is what they do.