How to create a 1M record table with a single query
1–10 of 40 posts
Re: How to create a 1M record table with a single query
#2A table of which DMBS’s support this would be useful
Re: How to create a 1M record table with a single query
#3Re: How to create a 1M record table with a single query
#4 SELECT id, random()
FROM generate_series(0, 1000000) g (id);
There seems to be an equivalent in SQLite: https://sqlite.org/series.html[1] https://www.postgresql.org/docs/current/functions-srf.html
Re: How to create a 1M record table with a single query
#5> This is not a problem if your DBMS supports SQL recursion A table of which DMBS’s support this would be useful
Re: How to create a 1M record table with a single query
#6E.g. I have a table structure but not alot of rows in it, so i go use this to get alot of rows in to check how fast queries get processed?
Re: How to create a 1M record table with a single query
#7> This is not a problem if your DBMS supports SQL recursion A table of which DMBS’s support this would be useful
Microsoft SQL Server, Firebird 2.1, PostgreSQL, SQLite, IBM Informix version, CUBRID, MariaDB and MySQL
Re: How to create a 1M record table with a single query
#8> This is not a problem if your DBMS supports SQL recursion A table of which DMBS’s support this would be useful
Re: How to create a 1M record table with a single query
#9Can someone give me a specific use case for this? As "check how a query behaves on a large table" is very vague to me. E.g. I have a table structure but not alot of rows in it, so i go use this to get alot of rows in to check how fast queries get processed?