<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=RU link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US>Max, hi.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>I’d like to discuss JBIDE-2173 &
JBIDE-2162.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>From our JBIDE-2162 discussion:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>“</span><span lang=EN-US
style='font-family:"Arial","sans-serif";color:black'>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:</span><span lang=EN-US>”<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>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).<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Also I try to study the problem to find
common workaround for it – and seems it exist!<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Now to get foreing keys we are using<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>getMetaDataDialect().getExportedKeys<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>but it possible to use<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>getMetaDataDialect().getImportedKeys<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Seems this have a sense, isn’t it?<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>About JDBCReader – when I try to
modify it I saw some potential problem here – <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>This is code to add table into dbs:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Table table =
dbs.addTable(quote(getSchemaForModel(schemaName)),
getCatalogForModel(catalogName), quote(tableName));<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>This is code to get table from dbs:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>dbs.getTable(schemaName, catalogName,
tableName)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>obvious that here will be a problem with
quotes…<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>I think the better way incorporate quotes
process into DatabaseCollector.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Best regards,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Vitali<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
</div>
</body>
</html>