Open Din7890 opened 1 year ago
Interesting - I'm not able to test with Oracle, but I tried PostgreSQL as it has a similar JDBC backing and couldn't reproduce. I see that you say no error message is produced. Does the query have "FINISHED" status? What does the query plan look like when using the UI?
The query has a "FINISHED" status
What is the output when you run EXPLAIN ANALYZE
on your query?
Have you tried any other queries on information_schema
? And if so, do they succeed?
Here is the explain plan with 100 tables --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> Fragment 1 [ROUND_ROBIN] > CPU: 38.32ms, Scheduled: 1.11s, Input: 100 rows (2.72kB); per task: avg.: 14.29 std.dev.: 34.99, Output: 100 rows (2.72kB) > Output layout: [table_name, column_name] > Output partitioning: SINGLE [] > Stage Execution Strategy: UNGROUPED_EXECUTION >
Fragment 2 [SOURCE] > CPU: 3.50s, Scheduled: 32.21s, Input: 100 rows (4.67kB); per task: avg.: 100.00 std.dev.: 0.00, Output: 100 rows (2.72kB) > Output layout: [table_name, column_name] > Output partitioning: ROUND_ROBIN [] > Stage Execution Strategy: UNGROUPED_EXECUTION >
(1 row)
Here is the explain plan with 101 tables
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> Fragment 1 [ROUND_ROBIN] > CPU: 29.20ms, Scheduled: 764.43ms, Input: 0 rows (0B); per task: avg.: 0.00 std.dev.: 0.00, Output: 0 rows (0B) > Output layout: [table_name, column_name] > Output partitioning: SINGLE [] > Stage Execution Strategy: UNGROUPED_EXECUTION >
Fragment 2 [SOURCE] > CPU: 445.50us, Scheduled: 462.50us, Input: 0 rows (0B); per task: avg.: 0.00 std.dev.: 0.00, Output: 0 rows (0B) > Output layout: [table_name, column_name] > Output partitioning: ROUND_ROBIN [] > Stage Execution Strategy: UNGROUPED_EXECUTION >
(1 row)
I have same issue with other schemas too where if the tables are more than 100 the query returns 0 results
So different schemas but the same Oracle connector?
Yes that is correct
Presto returning 0 results when the query contains more than 100 tables. Here is the sample query
select table_name, column_name from xxxuser.information_schema.columns where xxxuser.information_schema.columns.table_schema = xxx_user' order by xxxuser.information_schema.columns.table_name; The above query returns non zero results if the number of tables are 100 or less.
Your Environment
Expected Behavior
The query should return the tables and columns from the schema specified in the query.
Current Behavior
The query returns correct results if the number of tables are less or equal to 100. If it has more than 100 tables, it returns 0 rows, and it does not throw any errors in the logs
Possible Solution
Is there any configuration change in Presto, that limits the table scans to 100?
Steps to Reproduce
Screenshots (if appropriate)
Context