2 Replies Latest reply on Feb 2, 2017 12:59 PM by Steven Hawkins

    Why Cassandra connector fetches entire table data?

    Vijay K Newbie

      I have created VDB with Cassandra as datasource. In Cassandra I have column family called "Person". My VDB configuration looks like below


          <model name="CassandraaDB" visible="true">
              <source name="cassandraDB" connection-jndi-name="java:/cassandraDS" translator-name="cassandra"/>


          <model name="TeiidTables" visible="true">
              <source name="cassandraDB" translator-name="cassandra" connection-jndi-name="java:/cassandraDS" />
              <metadata type="DDL"><![CDATA[
                  CREATE FOREIGN TABLE Person (
                       nr integer,     
                       country varchar,
                       name varchar,
                       PRIMARY KEY (nr)


      While debugging the performance issues, what I have observed is, if I execute the below query using Teiid JDBC Driver


      select * from CassandraDB.Person where country = 'US'


      Teiid fetches the entire table content, and returns the result (so it is very slow), where as below query fetches only the matching records (very fast)


      select * from TeiidTables.Person where country = 'US'


      I could not understand the reason? any explanation please?


      I am using Teiid 9.1.1 + JDK 6 + Cassandra 2.1.16