Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show table extended is slow #269

Closed
lipan1024 opened this issue Dec 6, 2021 · 3 comments
Closed

Show table extended is slow #269

lipan1024 opened this issue Dec 6, 2021 · 3 comments

Comments

@lipan1024
Copy link

Describe the problem
I use spark-thirft to connect to the spark cluster

When I use a console to run commands
dbt run -m test_spark5
This is the output log from the console

Found 331 models, 51 tests, 1 snapshot, 0 analyses, 577 macros, 0 operations, 12 seed files, 146 sources, 11 exposures

10:02:53 | Concurrency: 5 threads (target='dev')
10:02:53 |
10:02:53 | 1 of 1 START incremental model test.test_spark5...................... [RUN]
10:03:05 | 1 of 1 OK created incremental model test.test_spark5................. [OK in 12.67s]
10:03:06 |
10:03:06 | Finished running 1 incremental model in 53.37s.

When I run commands using both consoles
First console:dbt run -m test_spark5
Second console:dbt run -m test_spark6
This is the output log from the first console

Running with dbt=0.20.2
Found 331 models, 51 tests, 1 snapshot, 0 analyses, 577 macros, 0 operations, 12 seed files, 146 sources, 11 exposures

10:16:15 | Concurrency: 5 threads (target='dev')
10:16:15 |
10:16:15 | 1 of 1 START incremental model test.test_spark5...................... [RUN]
10:16:22 | 1 of 1 OK created incremental model test.test_spark5................. [OK in 6.60s]
10:16:22 |
10:16:22 | Finished running 1 incremental model in 111.36s.

This is the output log from the second console

Running with dbt=0.20.2
Found 331 models, 51 tests, 1 snapshot, 0 analyses, 577 macros, 0 operations, 12 seed files, 146 sources, 11 exposures

10:16:11 | Concurrency: 5 threads (target='dev')
10:16:11 |
10:16:11 | 1 of 1 START incremental model test.test_spark6...................... [RUN]
10:16:22 | 1 of 1 OK created incremental model test.test_spark6................. [OK in 10.33s]
10:16:22 |
10:16:22 | Finished running 1 incremental model in 110.50s.

Conclusion
The time for the same Spark Application to run the show table extended in test like '*' statement is doubled.

I have summed up this conclusion after testing for many times. Is there any way to avoid this problem.

Supplement
For some reason, I can only run one model at a time, so I can't use dbt run -m test_spark5 test_spark6

@lipan1024 lipan1024 changed the title show table extended is slow Show table extended is slow Dec 6, 2021
@jtcohen6
Copy link
Contributor

(Relevant: dbt-labs/dbt-adapters#513)

@VersusFacit
Copy link
Contributor

Hey there! First off @lipan1024 , were you able to discovery more or resolve your issue with:

For some reason, I can only run one model at a time, so I can't use dbt run -m test_spark5 test_spark6
If that's still an issue, it's probably worth a separate issue unless it was something related to your particular setup.

Second, the context you've given spells out the time difference well. That said, I can't quite tell why that show table instruction would differ. Some questions to help us hone in:

  • Is this a regular occurrence?
  • How did you isolate the show table instruction as the source of the performance issue?
  • Do they have different schema they belong to? (this would affect the number of show table instructions; this may not be a good question according to certain things about your environment I can't know from afar)

@jtcohen6
Copy link
Contributor

This is a known performance bottleneck, originally opened in dbt-labs/dbt-adapters#513. There's investigation and potential next steps described in #296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants