-
Notifications
You must be signed in to change notification settings - Fork 96
len(rel) is slow #458
Copy link
Copy link
Closed
Labels
enhancementIndicates new improvementsIndicates new improvements
Milestone
Metadata
Metadata
Assignees
Labels
enhancementIndicates new improvementsIndicates new improvements
Type
Fields
Give feedbackNo fields configured for issues without a type.
I noticed that if I have a long table (relation)
rel, then callinglen(rel)can be quite slow. It takes about 2 seconds on our setup to return if the length is say, 300000 tuples. Here's the code inRelationalOperand:After looking at the code for
RelationalOperand.preview(), I noticed that it useslen(self.proj())instead oflen(self), which returns the same result in about half the time. Could__len__be sped up? Maybe just replace it withlen(self.proj())?