Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXISTS with subquery runs into out of time #83

Open
matthiastz opened this issue Jan 2, 2020 · 1 comment
Open

EXISTS with subquery runs into out of time #83

matthiastz opened this issue Jan 2, 2020 · 1 comment

Comments

@matthiastz
Copy link

setup:

schema TrackSchema(TrackId: int, Name: varchar, AlbumId: int,
		MediaTypeId: int, GenreId: int, Composer: varchar,
		Milliseconds: int, Bytes: int, UnitPrice: numeric); 
table Track(TrackSchema);
schema GenreSchema(GenreId: int, Name: varchar); 
table Genre(GenreSchema);

query q1
`SELECT t.TrackId, t.Name, t.GenreId 
FROM Track t
WHERE EXISTS
(SELECT g.GenreId FROM Genre g WHERE t.GenreId = g.GenreId AND (g.Name = 'Reggae' OR g.Name = 'Jazz'))`;

query q2
`SELECT t.TrackId, t.Name, t.GenreId 
FROM Track t
WHERE EXISTS
(SELECT g.GenreId FROM Genre g WHERE t.GenreId = g.GenreId AND g.Name = 'Reggae' OR g.Name = 'Jazz')`;

verify q1 q2;

result:
Two queries' equivalence is unknown. Solver runs out of time.

@matthiastz matthiastz changed the title Exists with subquery runs into out of time EXISTS with subquery runs into out of time Jan 2, 2020
@stechu
Copy link
Contributor

stechu commented Jan 2, 2020

Interesting! Thanks for the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants