3 ms·
> If the database is too big, just use last N amount of rows from the database instead of a full dump. For SQL optimization purposes, you cannot do that – ther
by samokhvalov 5y ago
> If the database is too big, just use last N amount of rows from the database instead of a full dump.
For SQL optimization purposes, you cannot do that – there are high chances you'll get different query plans.
- capableweb 5y agoYeah, if your database is under 1TB, it's relatively easy and usable to just clone the full thing. But above that, it starts becoming a hassle and you might need to strip away some stuff you don't care about (and won't affect the query plans), otherwise it can take a long time to backup/restore into new instance.
- samokhvalov 5y agoBut in general case, such clones are not suitable for query optimization tasks. And as I already mentioned in my other comments here, thin cloning is a great way to solve the speed (and money) problem for larger DBs.