Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-227

Replace collections.named_tuple by PyStruct_Sequence (C-Python)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.4
    • 1.1.5
    • DBAPI 2.0
    • None
    • 3.10

    Description

      The used named_tuple class from collections module is

      • too slow
      • consumes too much memory

      How to repeat:

      import mariadb
       
      connection= mariadb.connect(db="test")
      cursor= connection.cursor(named_tuple=True)
      for in range(1,1000):
          cursor.execute("SELECT seq FROM seq_1_to_10000")
          rows= cursor.fetchall()
      

      Output:

      georg@beethoven:~/work/python/test$ python3.10 test_conpy227.py
      Killed
      

      Same behavior when running this script with MySQL Connector/Python, which also uses collections.named_tuple.

      Attachments

        Activity

          People

            georg Georg Richter
            georg Georg Richter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.