Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-3410

OOM Error with Heavily Nested Queries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • COMP - Compiler

    Description

      Something I came across while trying to use AFrame with AsterixDB (https://dzone.com/articles/dataframes-with-big-data-in-couchbase). A pattern used by AFrame and early versions of Graphix involved repeatedly nesting queries:

      SELECT VALUE OBJECT_REMOVE(t, 'categories') 
      FROM (
        SELECT t.*, to_bigint(contains(categories, "Home Services")) AS `Home Services` 
        FROM (
          SELECT t.*, to_bigint(contains(categories, "Bars")) AS `Bars`
          FROM ...
          
          .
          .
          .
          
        ) t
      ) t

       

      Unfortunately, for heavily nested queries, AsterixDB throws an out of memory error. This was an issue I faced with the compiler, not the runtime (I ran this with EXPLAIN, and I still got the OOM error).

       

      Potential remedy: we do have a decorrelation Algebricks rule, but it may (potentially) be less memory intensive to have an AST-level rule that tries to do the same.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ggalvizo Glenn Justo Galvizo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: