Skip to content

SELECT involving CLOB column is 15X slow than without CLOB column #1755

@gyut

Description

@gyut

Steps to reproduce

User.role is a CLOB. Takes 80ms.
User.select(User.column_names).all.to_a
D, [2018-08-13T12:03:31.270377 #56195] DEBUG -- : User Load (78.8ms)

Without User.role it takes 5ms.
User.select(User.column_names - %w(roles)).all.to_a
D, [2018-08-13T12:03:23.412199 #56195] DEBUG -- : User Load (4.5ms)

Expected behavior

Running a SELECT query that includes a CLOB column should be roughly as fast as running a SELECT query without the CLOB column.

Actual behavior

Running a SELECT query that includes a CLOB column is about 15x slower than without the CLOB column.

System configuration

Rails version: 5.2.1

Oracle enhanced adapter version: 5.2.3

Ruby version: 2.4.2p198

Oracle Database version: Oracle Database 11g Release 11.2.0.4.0 - 64bit Production

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions