I am hoping to find how I can get the kb size of a result set in OracleDB. I am not an sysadmin, but often run queries that return over 100k rows and I would need to find a way to determine what is the total kb size. thank you
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
Generally, you would replace your column list with a
count(*)
to return the row count.I'm not sure how well that would work on really complicated queries with many joins and such but, for simpler queries, it should be fine. Replace:
with
That will give you the row count before you run the real query. Just keep in mind there's a chance the data may change between your count query and real query (hopefully not too much). Knowledge of the data properties will allow you to approximate kilobytes from row count.
In SQL*Plus:
To use AUTOTRACE requires the PLUSTRACE role, which is not granted by default. Find out more.