Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
jfenico
Helper III
Helper III

Creating MySQL Select Query vs Importing Entire Table

Hello folks,

 

I'm at a crossroad and need some advice on best practices. Right now, the power bi dashboard I'm creating is working great and what we plan to do later is roll out to more viewers. However, thinking ahead, the database that we are bringing information from is both a MySQL database and is responsible for running other services. Right now. Power BI imports records via a regular MySQL data source import. Certain tables have over 135,000 rows before filtering out the data we want. My thought is, as this grows it could become harder for PowerBI and MySQL to manage this information without causing performance issues.

 

I'm wondering if it possible to run MySQL Select statements within Power BI so that instead of importing the 135,000 rows, I can filter it before importing into Power BI. I know you can run Direct Queries with SQL, but not MySQL. And I know you can create Blank Queries from scratch but it appears a simple copy/paste from MYSQL does not work as Power BI has its own way of formatting. Are there any instructions on how to bring queries from MYSQL over to Power BI? OR is my thought of bringing in more and more rows even an issue down the line?

 

Thanks,

 

J

1 ACCEPTED SOLUTION
corbusier
Advocate IV
Advocate IV

When you are importing the tables, you should be able to click the "Advanced" button and then enter the MySQL query, which should work unless you are using some MySQL functions that somehow don't work when passed via the Power BI JDBC interface. 

 

As for what is better, it really depends on your needs - however, in your position I would try to set up a slave DB at least, so that you're not hitting the Production database with every query. You can further reduce the load by using Import instead of DirectQuery, and setting up a refresh schedule that hits the DB at non-peak times, once published.

View solution in original post

2 REPLIES 2
corbusier
Advocate IV
Advocate IV

When you are importing the tables, you should be able to click the "Advanced" button and then enter the MySQL query, which should work unless you are using some MySQL functions that somehow don't work when passed via the Power BI JDBC interface. 

 

As for what is better, it really depends on your needs - however, in your position I would try to set up a slave DB at least, so that you're not hitting the Production database with every query. You can further reduce the load by using Import instead of DirectQuery, and setting up a refresh schedule that hits the DB at non-peak times, once published.

Thanks corbusier, for some reason I wasn't seeing the advanced option until you called it out! 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.