# Using ConnectorX, Arrow, and dlt to speed up PostgreSQL data processing

DevFeed: [Using ConnectorX, Arrow, and dlt to speed up PostgreSQL data processing](<https://devfeed.tech/articles/get-30x-speedups-when-reading-databases-with-connectorx-arrow-dlt-80287.md>)

Original publisher: [Read original article](<https://dlthub.com/blog/dlt-arrow-loading>)

Author: Marcin Rudolf

Published: 2023-10-23T00:00:00Z

Content type: tutorial

Language: en

Sources: [DLT Hub](<https://devfeed.tech/sources/dlt-hub.md>)

Topics: [data-engineering](<https://devfeed.tech/topics/data-engineering.md>), [DuckDB](<https://devfeed.tech/topics/duckdb.md>), [etl](<https://devfeed.tech/topics/etl.md>), [compressing data with Parquet](<https://devfeed.tech/topics/compressing-data-with-parquet.md>)

Tags: [arrow](<https://devfeed.tech/tags/arrow.md>), [data-engineering](<https://devfeed.tech/tags/data-engineering.md>), [databases](<https://devfeed.tech/tags/databases.md>), [duckdb](<https://devfeed.tech/tags/duckdb.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [parquet](<https://devfeed.tech/tags/parquet.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [rust](<https://devfeed.tech/tags/rust.md>)

## AI overview

A tutorial compares processing 10 million PostgreSQL rows with ConnectorX and Arrow versus SQLAlchemy in dlt. In the reported local database test, extraction and normalization took about 16 seconds with Arrow, compared with about 8 minutes with SQLAlchemy. The comparison excludes the loading step and notes that remote database network latency would reduce the speedup.

## Source excerpt

If rust + arrow + duckb is a new data engineering stack, now you can get a feel of it with `dlt`. We recently added native arrow tables (and panda frames) loading. What it means? You can pass an Arrow table to `dlt` **pipeline.run** or **pipeline.extract** methods, have it normalized, saved to parquet and loaded to your destination. Here we achieved ~30x speedups when loading data from (local) postgres database using ConnectorX + Arrow compared to SqlAlchemy + json.