Solr
  1. Solr
  2. SOLR-2199

DIH JdbcDataSource - Support multiple resultsets

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Labels:
      None

      Description

      Database servers can return multiple result sets from a single statement. This can be beneficial for indexing because it reduces the number of connections and statements being executed against a database, therefore reducing overhead. The JDBC Statement object supports reading multiple ResultSets. Support should be added to the JdbcDataSource to take advantage of this.

      1. SOLR-2199.patch
        8 kB
        Kristine Jetzke
      2. SOLR-2199.patch
        1 kB
        Mark Waddle

        Activity

        Hide
        Mark Waddle added a comment -

        Patch to support multiple result sets in JdbcDataSource

        Show
        Mark Waddle added a comment - Patch to support multiple result sets in JdbcDataSource
        Hide
        Thomas Champagne added a comment -

        I don't understand why this patch have not been applied. It is very small and uncomplicated. It's a good idea to read multiple resultset from a single statement.

        But in my case, i would like set SQL session parameters before executing the query.

        For example with a Postgresql example :

        SET join_collapse_limit=1;
        SELECT * FROM library.book b
        LEFT JOIN library.page p ON p.id_book=b.id_book;
        

        In this example, the first resultset is empty but with the patch, the second resultset would be read.

        Show
        Thomas Champagne added a comment - I don't understand why this patch have not been applied. It is very small and uncomplicated. It's a good idea to read multiple resultset from a single statement. But in my case, i would like set SQL session parameters before executing the query. For example with a Postgresql example : SET join_collapse_limit=1; SELECT * FROM library.book b LEFT JOIN library.page p ON p.id_book=b.id_book; In this example, the first resultset is empty but with the patch, the second resultset would be read.
        Hide
        Kristine Jetzke added a comment - - edited

        Any chance of this patch being applied soon? If there is still work to do I'd be happy to make any required changes to it.

        Show
        Kristine Jetzke added a comment - - edited Any chance of this patch being applied soon? If there is still work to do I'd be happy to make any required changes to it.
        Hide
        Mikhail Khludnev added a comment -

        Kristine Jetzke, at least it lacks a unit test. I'd like to commit if it's provided.

        Show
        Mikhail Khludnev added a comment - Kristine Jetzke , at least it lacks a unit test. I'd like to commit if it's provided.
        Hide
        Kristine Jetzke added a comment -

        Mikhail Khludnev I attached a new patch that additionally handles some cases that were missing in the original patch (e.g. result set is initially returned, followed by an update count, followed by another result set or update count initially returned followed by a result set). I also added unit tests.

        Show
        Kristine Jetzke added a comment - Mikhail Khludnev I attached a new patch that additionally handles some cases that were missing in the original patch (e.g. result set is initially returned, followed by an update count, followed by another result set or update count initially returned followed by a result set). I also added unit tests.
        Hide
        Mikhail Khludnev added a comment -

        the patch seems fine. committing.

        Show
        Mikhail Khludnev added a comment - the patch seems fine. committing.
        Hide
        ASF subversion and git services added a comment -

        Commit fce10ae1097fa7f764516f2b343365e86afc273d in lucene-solr's branch refs/heads/master from Mikhail Khludnev
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=fce10ae ]

        SOLR-2199: DataImportHandler (DIH) JdbcDataSource supports multiple resultsets per query

        Show
        ASF subversion and git services added a comment - Commit fce10ae1097fa7f764516f2b343365e86afc273d in lucene-solr's branch refs/heads/master from Mikhail Khludnev [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=fce10ae ] SOLR-2199 : DataImportHandler (DIH) JdbcDataSource supports multiple resultsets per query
        Hide
        ASF subversion and git services added a comment -

        Commit c67258694be9e0ce9a0631f64d14a7853e81dc9a in lucene-solr's branch refs/heads/branch_6x from Mikhail Khludnev
        [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c672586 ]

        SOLR-2199: DataImportHandler (DIH) JdbcDataSource supports multiple resultsets per query

        Show
        ASF subversion and git services added a comment - Commit c67258694be9e0ce9a0631f64d14a7853e81dc9a in lucene-solr's branch refs/heads/branch_6x from Mikhail Khludnev [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c672586 ] SOLR-2199 : DataImportHandler (DIH) JdbcDataSource supports multiple resultsets per query

          People

          • Assignee:
            Mikhail Khludnev
            Reporter:
            Mark Waddle
          • Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development