[ 
https://issues.apache.org/jira/browse/IGNITE-9989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16709074#comment-16709074
 ] 

Pavel Kuznetsov commented on IGNITE-9989:
-----------------------------------------

Pgsql plan for SelectBySalaryWithJoin :
{noformat}
Hash Join  (cost=1292.42..2624.51 rows=361 width=1572)            Hash Cond: 
(o.id = p.org_id)            ->  Seq Scan on organization o  (cost=0.00..839.04 
rows=10304 width=524)      
          ->  Hash  (cost=1287.91..1287.91 rows=361 width=1056)                 
->  Bitmap Heap Scan on person p  (cost=60.12..1287.91 rows=361 width=1056)     
                      Recheck Cond: ((salary >= '366018000'::bigint) AND 
(salary <= '367017000'::bigint))                             ->  Bitmap Index 
Scan on sal_idx  (cost=0.00..60.03 rows=361 width=0)                            
     Index Cond: ((salary >= '366018000'::bigint) AND (salary <= 
'367017000'::bigint))
{noformat}

Pgsql plan for SelectByPkWithJoin :
{noformat}
Hash Join  (cost=1292.42..2624.51 rows=361 width=1572)            Hash Cond: 
(o.id = p.org_id)            ->  Seq Scan on organization o  (cost=0.00..839.04 
rows=10304 width=524)      
          ->  Hash  (cost=1287.91..1287.91 rows=361 width=1056)                 
->  Bitmap Heap Scan on person p  (cost=60.12..1287.91 rows=361 width=1056)     
                      Recheck Cond: ((id >= '661420'::bigint) AND (id <= 
'662419'::bigint))                           ->  Bitmap Index Scan on 
person_pkey  (cost=0.00..60.03 rows=361 width=0)                             
Index Cond: ((id >= '661420'::bigint) AND (id <= '662419'::bigint))
{noformat}

> JDBC v2: getPrimaryKeys always returns constant COLUMN_NAME, KEY_SEQ, PK_NAME
> -----------------------------------------------------------------------------
>
>                 Key: IGNITE-9989
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9989
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.6
>            Reporter: Pavel Kuznetsov
>            Assignee: Pavel Kuznetsov
>            Priority: Major
>              Labels: jdbc
>
> Jdbc v2 driver has hardcoded values for meta attibutes : 
> COLUMN_NAME = _KEY 
> KEY_SEQ = 1
> PK_NAME = _KEY
> But this values should be different for different tables.
> how to reproduce: 
> 1) connect to the cluser using jdbcv2 driver
> 2) CREATE TABLE TAB (ID LONG, SEC_ID LONG, VAL LONG, PRIMARY KEY(ID, SEC_ID))
> 3) check result of connection.getMetadata().getPrimaryKeys()



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to