Database query help

How often do you run the extract?

1 Like

About 1 month I will extract the data and import it into google sheets to share the data with mobile users, one query of mine will yield 3 rows and 8 columns takes about 30 seconds to return results

1 Like

so everytime you need to download all the data? not partly? then why not save all data to a txt file and download this txt file instead?
then only a file server needed

2 Likes

I hope not. But that is not what I meant.
For example, in a "bad" order database, you could have many orders for the same product, where you each time repeat the price and other properties. You could then have two tables, one with products and one with orders, where each order references a row in the product database. In such a case you could save a lot of space and rows.

What do you mean with that?

It would really help if you could provide more specific information about what is in your database and how you try to access it.
There are several good database experts on this forum, but we cannot help you if everything stays vague.

1 Like

Spreadsheets are not exactly a DBMS. There is little confusion about this concept.
To create relational databases, there are normalization rules.
And there are some other concepts (transactions, stored procedures, triggers...) that make spreadsheets not a DBMS.
These types of DBMS work with the SQL language, which has millions of query bases and is used by almost all programming languages.... So, I have no doubts that the solution to your problem is to change to a DBMS

With respect, I think all of this is a big red herring. If your app needs to load 3m cells, you've designed your app wrong. Doesn't matter if you use a Google Sheet, MySQL or a text file. I mean exporting from GoogleSheets to .csv makes most sense to me (maybe with a once an hour updating of the .csv file) might work, but...

Nobody can see 3m cells at once.

To answer this question usefully I'd recommend you better explain your app's reason to be, what it is going to do, rather than how you are going about it.

I hope this helps.

1 Like

SQLite is a good call though :slight_smile:

Possibly a database with 375000 rows, with 8 columns each row can support CloudDB.

What is the total size of your database approximately?

1 Like

I totally agree with Tom.
I hope that Thinh can explain his problem in a way that we can look at it.
That said, in my professional life I have seen databases, completely valid, with more than 3 million rows. But of course we did not try to access these directly on a phone.

If he really needs so many rows, he will have to live with the access time.

2 Likes