You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "B.J. Reed (JIRA)" <ji...@apache.org> on 2009/09/18 16:25:16 UTC
[jira] Created: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
shouldn't always use CAST with UPPER and LOWER for DB2
------------------------------------------------------
Key: OPENJPA-1308
URL: https://issues.apache.org/jira/browse/OPENJPA-1308
Project: OpenJPA
Issue Type: Improvement
Components: sql
Affects Versions: 2.0.0-M2, 1.2.1, 1.0.3
Environment: DB2
Reporter: B.J. Reed
Priority: Minor
Fix For: 2.0.0
Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
B.J. Reed updated OPENJPA-1308:
-------------------------------
Attachment: OPENJPA-1308-trunk.patch
OPENJPA-1308-1.2.x.patch
OPENJPA-1308-1.0.x.patch
Attached patches to be considered for inclusion to OpenJPA. No real differences in the patches except that the 1.0.x patch includes a new test case that wasn't already present in 1.0.x (the other 2 just modify the existing test case).
For the most part, the change is that when UPPER or LOWER are used, DB2Dictionary looks to see what the database column is defined as before doing the cast. In this way, if the column is already a VARCHAR, then indexes would still be used since no cast would be generated.
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
B.J. Reed updated OPENJPA-1308:
-------------------------------
Attachment: (was: OPENJPA-1308-trunk.patch)
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-1308:
----------------------------------
Affects Version/s: 2.0.0-M3
Fix Version/s: (was: 2.0.0)
2.0.0-M4
1.3.0
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2, 2.0.0-M3
> Environment: DB2
> Reporter: B.J. Reed
> Assignee: Michael Dick
> Priority: Minor
> Fix For: 1.0.4, 1.2.2, 1.3.0, 2.0.0-M4
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
B.J. Reed updated OPENJPA-1308:
-------------------------------
Attachment: (was: OPENJPA-1308-1.0.x.patch)
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (OPENJPA-1308) shouldn't always use CAST with
UPPER and LOWER for DB2
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick reassigned OPENJPA-1308:
-------------------------------------
Assignee: Michael Dick
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Assignee: Michael Dick
> Priority: Minor
> Fix For: 1.0.4, 1.2.2, 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
B.J. Reed updated OPENJPA-1308:
-------------------------------
Attachment: OPENJPA-1308-1.0.x.patch
OPENJPA-1308-1.2.x.patch
OPENJPA-1308-trunk.patch
Replacing old patches with new ones...Slightly better
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick updated OPENJPA-1308:
----------------------------------
Issue Type: Bug (was: Improvement)
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Assignee: Michael Dick
> Priority: Minor
> Fix For: 1.0.4, 1.2.2, 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
B.J. Reed updated OPENJPA-1308:
-------------------------------
Attachment: (was: OPENJPA-1308-1.2.x.patch)
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
B.J. Reed updated OPENJPA-1308:
-------------------------------
Attachment: (was: OPENJPA-1308-trunk.patch)
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-1308:
----------------------------------
Patch Info: [Patch Available]
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick updated OPENJPA-1308:
----------------------------------
Fix Version/s: 1.2.2
1.0.4
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Assignee: Michael Dick
> Priority: Minor
> Fix For: 1.0.4, 1.2.2, 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1308) shouldn't always use CAST with
UPPER and LOWER for DB2
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick resolved OPENJPA-1308.
-----------------------------------
Resolution: Fixed
Thanks for the patches, BJ. The fix is in the latest SNAPSHOT builds.
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Bug
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Assignee: Michael Dick
> Priority: Minor
> Fix For: 1.0.4, 1.2.2, 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
B.J. Reed updated OPENJPA-1308:
-------------------------------
Attachment: (was: OPENJPA-1308-1.0.x.patch)
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
B.J. Reed updated OPENJPA-1308:
-------------------------------
Attachment: (was: OPENJPA-1308-1.2.x.patch)
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1308) shouldn't always use CAST with UPPER
and LOWER for DB2
Posted by "B.J. Reed (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
B.J. Reed updated OPENJPA-1308:
-------------------------------
Attachment: OPENJPA-1308-trunk.patch
OPENJPA-1308-1.2.x.patch
OPENJPA-1308-1.0.x.patch
new patches include all changes from code review
> shouldn't always use CAST with UPPER and LOWER for DB2
> ------------------------------------------------------
>
> Key: OPENJPA-1308
> URL: https://issues.apache.org/jira/browse/OPENJPA-1308
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 1.0.3, 1.2.1, 2.0.0-M2
> Environment: DB2
> Reporter: B.J. Reed
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: OPENJPA-1308-1.0.x.patch, OPENJPA-1308-1.2.x.patch, OPENJPA-1308-trunk.patch
>
>
> Using DB2, when a user uses the UPPER or LOWER function, the field is automatically CAST to a varchar. It would be nice if OpenJPA were a little smarter and only used CAST when necessary. Using the CAST causes any indexes not to be used so performance won't be what it should.
> I saw some other DB2 functions that also are always CAST, so we may need to improve these also.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.