Skip to main content
Swapnil Gupta
Participating Frequently
Aug 4, 2020 10:02 PM UTC

Relativity Linux - SQL Performance Issue -- COUNT(*) , distinct and GROUP BY

I am doing the POC of Relativity on RM/COBOL Native File System. I am trying to use SQL using JDBC/ODBC connection [DBeaver/Microsoft Query]. File has 50M records. I noticed that GROUP BY, Distinct and COUNT on Primary Key is taking more than 10 mins. 

 

BackEnd file is Not marked for Recovery. Query Plan Viewer doesnot show any suspicious. 

I maybe missing some setup. I am new to Relativity. Can you please advise /guide ? 

 

    12 replies

    Thomas Morrison
    Participating Frequently
    Aug 13, 2020 6:19 AM UTC

    Thanks Tom. This helped. Will raise separate ticket for write-enabling.

    One final thing.  I need to add another source of information that I discovered just yesterday in my work for a client.

    There is a topic in the data client help file (relcs32.chm on my installation) titled "Relativity Indexes (Advanced)" that explains how Relativity produces indexes from the keys in the file.  It also has a good technical description of the issue of allowing NULLs to be produced in the indexes. 

    (This help file also clearly defines the SQL language that is supported by Relativity, including the scalar functions supported.  That's what I was looking for when I came across the index topic.)

    ----

    I truly appreciate that you stayed with the process to investigate and solve your issue.  You clearly did quite a bit of work to determine the NULL issue and especially your inventive way of using table filters to avoid the records containing bad data.

    Tom Morrison, Consultant, South Carolina, USA
    Swapnil Gupta
    Participating Frequently
    Aug 13, 2020 7:43 AM UTC

    One final thing.  I need to add another source of information that I discovered just yesterday in my work for a client.

    There is a topic in the data client help file (relcs32.chm on my installation) titled "Relativity Indexes (Advanced)" that explains how Relativity produces indexes from the keys in the file.  It also has a good technical description of the issue of allowing NULLs to be produced in the indexes. 

    (This help file also clearly defines the SQL language that is supported by Relativity, including the scalar functions supported.  That's what I was looking for when I came across the index topic.)

    ----

    I truly appreciate that you stayed with the process to investigate and solve your issue.  You clearly did quite a bit of work to determine the NULL issue and especially your inventive way of using table filters to avoid the records containing bad data.

    Thanks Tom highly Appreciated.  

    Is it possible to speak you for short I can quickly show work I done on my file ?