![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, Consider the view: create view my_view as select …whatever… from … these tables… where …stuff… What is the difference between: select * from my_view; and using the select on which the view is based: ie . just doing select …whatever… from …these tables… where …stuff… I thought the answer would be nothing. They should both come up with the same query plan and execute identically. I did not expect the select * from my_view to take several minutes and the simple select to take a few seconds. The QEPs between the two are radically different with the select from view having D/C numbers several orders of magnitude higher than those of the simple select. Martin Bowes |
#3
| |||
| |||
|
|
Consider the view: create view my_view as select …whatever… from … these tables… where …stuff… What is the difference between: select * from my_view; and using the select on which the view is based: ie . just doing select …whatever… from …these tables… where …stuff… I thought the answer would be nothing. They should both come up with the same query plan and execute identically. I did not expect the select * from my_view to take several minutes and the simple select to take a few seconds. The QEPs between the two are radically different with the select from view having D/C numbers several orders of magnitude higher than those of the simple select. |
#4
| |||
| |||
|
|
I don't think we want Ingres to be emulating these sort of Oracle features ;-) |
#5
| |||
| |||
|
|
I've just developed a test case which shows the base select taking ten seconds whereas the supposedly equivalent select from the view takes 2minutes 15seconds . |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
On Apr 23, 2009, at 10:41 AM, Martin Bowes wrote: I've just developed a test case which shows the base select taking ten seconds whereas the supposedly equivalent select from the view takes 2minutes 15seconds . It's refusing to do the NOT IN -> outer join transform, and using the old quel-based flattening model. I'm going to spend another few minutes with it to see if there is some simple reason for it not doing this transform. |
![]() |
| Thread Tools | |
| Display Modes | |
| |