# Testing Scalability of 'Assets' and 'Issuances' Tables

**URL:** <https://forums.counterparty.io/t/testing-scalability-of-assets-and-issuances-tables/6621>\
**Category:** Counterparty\
**Created:** [June 2, 2023, 2:04pm UTC](https://forums.counterparty.io/t/testing-scalability-of-assets-and-issuances-tables/6621 "2023-06-02T14:04:06Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![JPJA](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/jpja/32/1324_2.png) [@JPJA](https://forums.counterparty.io/u/JPJA)\
**Post date:** [June 2, 2023, 3:14pm UTC](https://forums.counterparty.io/t/testing-scalability-of-assets-and-issuances-tables/6621/3 "2023-06-02T15:14:39Z")

</div>

Hmmm, discovered an embarrassing mistake BUT THIS IS GOOD NEWS.

I used the `LIKE` operator intstead of `=`.

The findings after this change are better.

The time to look up an asset in the `assets` table is negligible – even after 1M records added  
`SELECT * FROM assets WHERE asset_name = 'X'`  
 ![image](https://canada1.discourse-cdn.com/flex004/uploads/counterpartytalk/original/2X/4/40119ca2203eae58f3297a804562d59705618df8.png)

On the `issuances` table` the increase is dramatic. Increasing the rows from \<200k to 1.2M (6x) makes the query ~13x slower (from 15ms to 190ms). Worse than O(n) performance!

`SELECT COUNT(*) FROM issuances WHERE asset = 'X'`  
 ![image](https://canada1.discourse-cdn.com/flex004/uploads/counterpartytalk/original/2X/f/f0824001a3f8b8de96d6ed287a3e37df85a74c5f.png)

Of course, there may be more that I’ve overlooked. Other, more relevant, queries for example?

---

_[View the full topic](https://forums.counterparty.io/t/testing-scalability-of-assets-and-issuances-tables/6621)._
