[jbosstools-dev] JBIDE-2173 & JBIDE-2162 - performance improvement (for MySQL?)

Vitali Yemialyanchyk vyemialyanchyk at exadel.com
Thu Jun 26 13:37:38 EDT 2008


Max, hi.

 

I'd like to discuss JBIDE-2173 & JBIDE-2162.

 

>From  our JBIDE-2162 discussion:

"I try debug DatabaseMetaData code and seems I find the reason. The main
problem here - for each table extracted all foreing keys for all tables:"

This is of course JBIDE-2173 and it seems here are the problems only with
MySQL - I have check Postrgre and got better performance (Postrgre has no
problems with performance).

Also I try to study the problem to find common workaround for it - and seems
it exist!

Now to get foreing keys we are using

getMetaDataDialect().getExportedKeys

but it possible to use

getMetaDataDialect().getImportedKeys

and we will get much better performance - I have check it - it possible and
we will get performance O(n) instead of O(n^2) for MySQL.

Seems this have a sense, isn't it?

 

About JDBCReader - when I try to modify it I saw some potential problem here
- 

This is code to add table into dbs:

Table table = dbs.addTable(quote(getSchemaForModel(schemaName)),
getCatalogForModel(catalogName), quote(tableName));

 

This is code to get table from dbs:

dbs.getTable(schemaName, catalogName, tableName)

 

obvious that here will be a problem with quotes.

I think the better way incorporate quotes process into DatabaseCollector.

 

Best regards,

Vitali

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbosstools-dev/attachments/20080626/6d1c1e17/attachment.html 


More information about the jbosstools-dev mailing list