linear-join-fuel.td 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. # Check that a long-running cross join does not prevent other queries
  10. # from making progress.
  11. $ postgres-execute connection=postgres://mz_system:materialize@${testdrive.materialize-internal-sql-addr}
  12. ALTER SYSTEM SET enable_mz_join_core = true
  13. > CREATE CLUSTER linear_join REPLICAS (r1 (SIZE '1'))
  14. > SET cluster=linear_join
  15. > CREATE TABLE t1 (a int);
  16. > INSERT INTO t1 SELECT generate_series(1, 100000);
  17. > CREATE MATERIALIZED VIEW v1 IN CLUSTER linear_join AS
  18. SELECT SUM(a1.a + a2.a * 10000) FROM t1 AS a1, t1 AS a2;
  19. > CREATE DEFAULT INDEX ON v1;
  20. # Will time out unless the join above is properly using fueling to yield
  21. > SELECT COUNT(*) > 0 FROM mz_introspection.mz_dataflow_operators;
  22. true
  23. > SELECT COUNT(*) > 0 FROM mz_introspection.mz_dataflow_operators;
  24. true
  25. > SELECT COUNT(*) > 0 FROM mz_introspection.mz_dataflow_operators;
  26. true