db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-1996) DatabaseMetaData.getColumns() takes long time to return columns for a particular schema of Apache JDO TCK
Date Tue, 05 Aug 2008 15:06:44 GMT

    [ https://issues.apache.org/jira/browse/DERBY-1996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619922#action_12619922

Rick Hillegas commented on DERBY-1996:

Hi Andy,

It doesn't look like anyone is working on this issue. You can vote for it and you can advocate
for it on derby-dev or derby-user. Note that there are 3 weeks left before we cut the 10.4.2

The following query may give you some of what you need. I have no idea how this query performs
on your schema:

select s.schemaname, t.tablename, c.columnname, c.columnnumber, c.columndatatype
from sys.sysschemas s, sys.systables t, sys.syscolumns c
where c.referenceid = t.tableid
and t.schemaid = s.schemaid
and t.tabletype = 'T'
order by s.schemaname, t.tablename, c.columnname, c.columnnumber

A couple points about this query:

o You can adjust this query by consulting the layout of the system tables. That layout is
described in the Derby Reference Guide.

o The columndatatype column is an object of type org.apache.derby.catalog.TypeDescriptor.
That class is not in Derby's public API and therefore is not guaranteed to be stable across
releases (although my sense is that it has tended to evolve in upward-compatible ways).

> DatabaseMetaData.getColumns() takes long time to return columns for a particular schema
of Apache JDO TCK
> ---------------------------------------------------------------------------------------------------------
>                 Key: DERBY-1996
>                 URL: https://issues.apache.org/jira/browse/DERBY-1996
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions:
>            Reporter: Andy Jefferson
>         Attachments: testcase.zip
> When running the Apache JDO "TCK", JPOX needs to query the columns for a particular schema,
and so uses DatabaseMetaData.getColumns(null, schemaName, null, null). This takes the order
of 3 minutes on a dual-core Pentium 3GHz (with large ram). I've cut the JPOX part down to
a stand-alone test (will attach it).
> Thing to note is that with only the schema files d_* installed it takes the order of
20secs. When the schema_* files are also installed then performance goes downhill fast (even
though they are in different schemas ... all *.sql file represents a different schema). No
point in me postulating what could be the issue since you guys are the Derby experts.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message