You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Frank Rivera <fr...@HoudiniESQ.com> on 2014/05/15 16:31:54 UTC
Re: --DERBY-PROPERTIES throws error if Where clause follows
Try adding a where clues after the --DERBY-PROPERTIES index = ATTACHMENT_LINKNAMES_INDEX and you will get the error!
> SELECT
> esq.attachment.guid, esq.attachment.file_name
> FROM
> esq.attachment
> --DERBY-PROPERTIES index = ATTACHMENT_LINKNAMES_INDEX
> WHERE esq.attachment.dtg>0;
Invalid Properties list in FROM list. There is no index 'ATTACHMENT_LINKNAMES_INDEX WHERE esq.attachment.dtg>0' on table 'ATTACHMENT'.
Sincerely,
Frank Rivera
LogicBit Software - Research Triangle Park, North Carolina
Product Brochures http://houdiniesq.com/HoudiniEsq_2014BrochureProduct.pdf
Product Testimonials http://houdiniesq.com/HoudiniEsq_2014BrochureShow.pdf
Support 919.238.7024 Corporate 408.213.8138 Sales 888.366.2280
HoudiniEsq ® Legal Practice Management Suite http://HoudiniEsq.com
Feature Rich web-based Legal Practice Management for today's cutting edge Law Firms
Any Browser, Any OS, Anytime, Anywhere, Any size organization, SaaS or On-premise
Simple & Simplicity are not the same thing. "Simple", as it turns out, simply isn't good enough.
-----------------------------------------------------------------------------------------------------------------
NOTICE: The sender does not accept liability for any errors or omissions in the contents of this message which arise as
a result of e-mail transmission. This e-mail and any files transmitted with it are confidential and are intended solely for
the use of the individual or entity to which they are addressed. It is not an offer or acceptance, and it is not intended to
be all or part of an agreement. This communication may contain material protected by the attorney-client privilege.
Original material created by the author may be protected by US Copyright law, 17 U.S.C. § 101 et seq. This communication
constitutes an electronic communication within the meaning of the Electronic Communications Privacy Act, 18 U.S.C.
§ 2510, and its disclosure is strictly limited to the recipient intended by the sender of this message. If you are not the
intended recipient or the person responsible for delivering the e-mail to the intended recipient, be advised that you have
received this e-mail in error and that any review, use, dissemination, forwarding, printing, or copying of this e-mail is strictly
prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete this email.
On Apr 17, 2014, at 11:50 AM, Rick Hillegas <ri...@oracle.com> wrote:
> Hi Frank,
>
> Qualifying column names with the esq schema does not affect my results. The following script runs fine for me:
>
> connect 'jdbc:derby:memory:db;create=true';
>
> create schema esq;
> set schema esq;
> create table attachment( guid int, file_name varchar( 10 ) );
> create index ATTACHMENT_LINKNAMES_INDEX on attachment( guid, file_name );
>
> SELECT
> esq.attachment.guid, esq.attachment.file_name
> FROM
> esq.attachment
> --DERBY-PROPERTIES index = ATTACHMENT_LINKNAMES_INDEX
> ;
>
> Hope this helps,
> -Rick
>
> On 4/17/14 8:24 AM, Frank Rivera wrote:
>> Will do.
>>
>> We implicitly use the schema “*esq*” (not the the name matters) in all column names and in the from clause e.g. “FROM *esq.*attachment”. Can you try it this way just to be sure I’m not crazy. We also use the schema when creating the index on the table. BTW 10.10.1.1 is what we are using. I see I typed it wrong in last email.
>>
>> Sincerely,
>>
>> Frank Rivera
>> LogicBit Software - Research Triangle Park, North Carolina
>>
>> Product Brochures http://houdiniesq.com/HoudiniEsq_2014BrochureProduct.pdf
>> Product Testimonialshttp://houdiniesq.com/HoudiniEsq_2014BrochureShow.pdf
>>
>> Support 919.238.7024Corporate 408.213.8138Sales 888.366.2280
>>
>> ***HoudiniEsq ® Legal Practice Management Suite *http://HoudiniEsq.com <http://houdiniesq.com/>
>>
>> Feature Rich web-based Legal Practice Management for today's cutting edge Law Firms
>> Any Browser, Any OS, Anytime, Anywhere, Any size organization, SaaS or On-premise
>>
>> Simple & Simplicity are not the same thing. *"Simple", as it turns out, simply isn't good enough.*
>> -----------------------------------------------------------------------------------------------------------------
>> *NOTICE*: The sender does not accept liability for any errors or omissions in the contents of this message which arise as
>> a result of e-mail transmission. This e-mail and any files transmitted with it are confidential and are intended solely for
>> the use of the individual or entity to which they are addressed. It is not an offer or acceptance, and it is not intended to
>> be all or part of an agreement. This communication may contain material protected by the attorney-client privilege.
>> Original material created by the author may be protected by US Copyright law, 17 U.S.C. § 101 et seq. This communication
>> constitutes an electronic communication within the meaning of the Electronic Communications Privacy Act, 18 U.S.C.
>> § 2510, and its disclosure is strictly limited to the recipient intended by the sender of this message. If you are not the
>> intended recipient or the person responsible for delivering the e-mail to the intended recipient, be advised that you have
>> received this e-mail in error and that any review, use, dissemination, forwarding, printing, or copying of this e-mail is strictly
>> prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete this email.
>>
>> On Apr 17, 2014, at 10:14 AM, Rick Hillegas <rick.hillegas@oracle.com <ma...@oracle.com>> wrote:
>>
>>> Hi Frank,
>>>
>>> I am unable to reproduce the problem you are seeing when I run the following script using Derby 10.10.1.1:
>>>
>>> connect 'jdbc:derby:memory:db;create=true';
>>>
>>> create table attachment( guid int, file_name varchar( 10 ) );
>>> create index ATTACHMENT_LINKNAMES_INDEX on attachment( guid, file_name );
>>>
>>> SELECT
>>> attachment.guid, attachment.file_name
>>> FROM
>>> attachment
>>> --DERBY-PROPERTIES index = ATTACHMENT_LINKNAMES_INDEX
>>> ;
>>>
>>>
>>> The error message you're seeing is raised by the parser. I have extracted the relevant method from the 10.10.2.0 parser into the attached zzz.java program. I am unable to reproduce the problem you're seeing when I run that program on your text. Try setting the PROPS field in that program equal to what follows "--DERBY-PROPERTIES" in your query and see if you can tickle the program into failing.
>>>
>>> Hope this helps,
>>> -Rick
>>>
>>> On 4/11/14 9:33 AM, Frank Rivera wrote:
>>>>
>>>> We have a simple query using LIKE but is very slow.
>>>> We need to tell the optimizer which index to use but the override DERBY-PROPERTIES statement returns the following error.
>>>>
>>>> *Invalid syntax for optimizer overrides. *The syntax should be -- DERBY-PROPERTIES propertyName = value [, propertyName = value]*
>>>>
>>>> Here is the SQL. The index does exist.
>>>>
>>>> *SELECT *
>>>> esq.attachment.guid, esq.attachment.file_name
>>>> *FROM *
>>>> esq.attachment
>>>> *--DERBY-PROPERTIES *index = ATTACHMENT_LINKNAMES_INDEX
>>>> *where
>>>> *(
>>>> esq.attachment.file_name LIKE ‘%drisco%'
>>>> OR esq.attachment.file_index_name LIKE ‘%drisco%'
>>>> )
>>>> AND
>>>> (
>>>> esq.attachment.link_guid IS NOT NULL
>>>> AND
>>>> esq.attachment.link_table='mat'
>>>> AND
>>>> esq.attachment.link_guid IN (
>>>> SELECT esq.matter.guid
>>>> FROM esq.matter
>>>> WHERE
>>>> esq.matter.guid=esq.attachment.link_guid
>>>> AND (
>>>> ( esq.matter.grp_guid=0 OR esq.matter.grp_guid IS NULL ) OR ( esq.matter.grp_guid>0 AND esq.matter.grp_guid IN ( 2,1,6,4,3 ) )
>>>> )
>>>>
>>>> )
>>>> ) ;
>>>>
>>>>
>>>>
>>>> Sincerely,
>>>>
>>>> Frank Rivera
>>>> LogicBit Software - Research Triangle Park, North Carolina
>>>>
>>>> Product Brochures http://houdiniesq.com/HoudiniEsq_2014BrochureProduct.pdf
>>>> Product Testimonialshttp://houdiniesq.com/HoudiniEsq_2014BrochureShow.pdf
>>>>
>>>> Support 919.238.7024Corporate 408.213.8138Sales 888.366.2280
>>>>
>>>> ***HoudiniEsq ® Legal Practice Management Suite *http://HoudiniEsq.com <http://houdiniesq.com/>
>>>>
>>>> Feature Rich web-based Legal Practice Management for today's cutting edge Law Firms
>>>> Any Browser, Any OS, Anytime, Anywhere, Any size organization, SaaS or On-premise
>>>>
>>>> Simple & Simplicity are not the same thing. *"Simple", as it turns out, simply isn't good enough.*
>>>> -----------------------------------------------------------------------------------------------------------------
>>>> *NOTICE*: The sender does not accept liability for any errors or omissions in the contents of this message which arise as
>>>> a result of e-mail transmission. This e-mail and any files transmitted with it are confidential and are intended solely for
>>>> the use of the individual or entity to which they are addressed. It is not an offer or acceptance, and it is not intended to
>>>> be all or part of an agreement. This communication may contain material protected by the attorney-client privilege.
>>>> Original material created by the author may be protected by US Copyright law, 17 U.S.C. § 101 et seq. This communication
>>>> constitutes an electronic communication within the meaning of the Electronic Communications Privacy Act, 18 U.S.C.
>>>> § 2510, and its disclosure is strictly limited to the recipient intended by the sender of this message. If you are not the
>>>> intended recipient or the person responsible for delivering the e-mail to the intended recipient, be advised that you have
>>>> received this e-mail in error and that any review, use, dissemination, forwarding, printing, or copying of this e-mail is strictly
>>>> prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete this email.
>>>>
>>>
>>> <zzz.java>