How to fetch an unlimited number of rows in presto?

Member

by adan , in category: MySQL , 4 months ago

How to fetch an unlimited number of rows in presto?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by domenico , 4 months ago

@adan 

In Presto, you can fetch an unlimited number of rows by using the LIMIT clause in your SQL query. By not setting a specific limit, Presto will fetch all available rows that meet the query criteria. Here's an example:

1
2
3
4
SELECT *
FROM your_table
WHERE your_condition
LIMIT 1000000; -- Fetch unlimited number of rows


In this example, the LIMIT clause is not setting a specific number and will fetch all available rows that meet the condition specified in the WHERE clause. You can remove the LIMIT clause entirely if you want to fetch all rows without restriction, but be cautious as it may consume a large amount of resources.


Also, make sure to optimize your query and use appropriate partitioning and filtering techniques to avoid performance issues when fetching a large number of rows.

Related Threads:

How to group time column into 5 second intervals and count rows using presto?
How to turn column into rows in presto?
How to get date_diff from previous rows in presto?
How to limit the number of rows displayed in phpMyAdmin?
How to get the number of rows returned mysql?
How to find the number of rows present in a json array in oracle?