Re: [SQL]

2001-09-07 Thread Haller Christoph
My understanding is you did it the best way. Alternatively, you may word your query as SELECT i.cname FROM fc_client_info i WHERE EXISTS ( SELECT * FROM fc_communication c WHERE c.acode = i.acode AND c.contactdate = '09/06/2001' ) ORDER BY lower(i.cname); instead

[SQL] ERROR: DefineQueryRewrite: rule plan string too big.

2001-09-07 Thread Haller Christoph
I tried to create a view as follows create view sesql_userindexes as SELECT c.relname AS TBL_NAME, i.relname AS IDX_NAME, x.indisunique AS UNIQUE_FLAG, 1+ (CASE WHEN x.indkey[1]=0 THEN 0 ELSE 1 END)+(CASE WHEN x.indkey[2]=0 THEN 0 ELSE 1 END)+ (CASE WHEN x.indkey[3]=0 THEN 0 ELSE 1 END)+(CASE

Re: [SQL] ERROR: DefineQueryRewrite: rule plan string too big.

2001-09-07 Thread Tom Lane
Haller Christoph <[EMAIL PROTECTED]> writes: > I received the error message > ERROR: DefineQueryRewrite: rule plan string too big. > If do the SELECT without creating the view, it works as intended. > I have to mention I am still working on version 6.1 (shame on me). Indeed. > Is this fixed

[SQL] optimizing queries and indexes...

2001-09-07 Thread Robert J. Sanford, Jr.
i'm fairly new at this whole database design thing and my grasp of set theory is not what it was when i was in college lo these many years past. but i want to get a better idea of how to optimize sql statements. i have several friends that are DBA's by profession and work on oracle and/or ms sql