# How to remove default "LIMIT 100" in SQL Console?

**URL:** <https://community.cratedb.com/t/how-to-remove-default-limit-100-in-sql-console/596>\
**Category:** CrateDB\
**Created:** [March 25, 2021, 6:23pm UTC](https://community.cratedb.com/t/how-to-remove-default-limit-100-in-sql-console/596 "2021-03-25T18:23:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sampope](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@sampope](https://community.cratedb.com/u/sampope)\
**Post date:** [March 25, 2021, 6:23pm UTC](https://community.cratedb.com/t/how-to-remove-default-limit-100-in-sql-console/596/1 "2021-03-25T18:23:41Z")

</div>

I notice every query is limited to 100 results in the Admin UI. I didn’t see anything in the [SQL Console docs](https://crate.io/docs/crate/admin-ui/en/latest/console.html#sql-console) about this limit. Is there a way to remove the limit? Or set it to something higher?

Thanks.

---

<div class="post-metadata">

**Author:** ![proddata](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/proddata/32/1379_2.png) [@proddata](https://community.cratedb.com/u/proddata)\
**Post date:** [March 25, 2021, 6:30pm UTC](https://community.cratedb.com/t/how-to-remove-default-limit-100-in-sql-console/596/2 "2021-03-25T18:30:06Z")

</div>

you can just manually set it to a higher number by just adding another `LIMIT` to your query  
It is basically a safety measure so that you don’t `SELECT` your complete multi-billion-row table 😉

---

<div class="post-metadata">

**Author:** ![sampope](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@sampope](https://community.cratedb.com/u/sampope)\
**Post date:** [March 25, 2021, 6:34pm UTC](https://community.cratedb.com/t/how-to-remove-default-limit-100-in-sql-console/596/3 "2021-03-25T18:34:11Z")

</div>

Thanks!

For the record, querying a SELECT DISTINCT on the billion row table is pretty quick:

```auto
SELECT OK, 241 rows in set (4.681 sec)

```

---

<div class="post-metadata">

**Author:** ![proddata](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/proddata/32/1379_2.png) [@proddata](https://community.cratedb.com/u/proddata)\
**Post date:** [March 25, 2021, 6:38pm UTC](https://community.cratedb.com/t/how-to-remove-default-limit-100-in-sql-console/596/4 "2021-03-25T18:38:56Z")

</div>

might also want to try **hyperloglog\_distinct**

[https://crate.io/docs/crate/reference/en/4.4/general/builtins/aggregation.html#hyperloglog-distinct](https://crate.io/docs/crate/reference/en/4.4/general/builtins/aggregation.html#hyperloglog-distinct)

---

<div class="post-metadata">

**Author:** ![sampope](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@sampope](https://community.cratedb.com/u/sampope)\
**Post date:** [March 25, 2021, 7:03pm UTC](https://community.cratedb.com/t/how-to-remove-default-limit-100-in-sql-console/596/5 "2021-03-25T19:03:32Z")

</div>

It is not faster:

```auto
select hyperloglog_distinct(servername) from billion_row_table limit 1000;

```

```auto
SELECT OK, 1 row in set (69.863 sec)

```

same count in the end, but i needed the actual results, not just the count.

although, it at least returns a result, as compared to:

```auto
select COUNT(DISTINCT servername) from billion_row_table limit 1000;

```

```auto

Error!

CircuitBreakingException[[query] Data too large, data for [collect: 0] would be [19327877120/18gb], which is larger than the limit of [19327352832/18gb]]

```

Thanks!

---

<div class="post-metadata">

**Author:** ![proddata](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/proddata/32/1379_2.png) [@proddata](https://community.cratedb.com/u/proddata)\
**Post date:** [March 25, 2021, 7:19pm UTC](https://community.cratedb.com/t/how-to-remove-default-limit-100-in-sql-console/596/6 "2021-03-25T19:19:25Z")

</div>

right … maybe something that could be optimized 🤔
