![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#41
| |||
| |||
|
|
You and Mark seem to have a bit of a disagreement with respect to the proper implementation. No doubt that will be resolved with new "compatibility" features. There it is again "proper implementation". |
#42
| |||
| |||
|
|
From: Mark Townsend <markbtownsend (AT) sbcglobal (DOT) net There has always been some discussion about which approach is more "correct". Obviously we at Oracle think this approach is better, for a number of really good reasons. We could also do temp tables the same way as informix and SQL Server, but have chosen to not implement them yet, also for a number of good reasons. It does make migration from these databases to Oracle a little problematic however |
#43
| |||
| |||
|
|
DA Morgan said: BTW: Obnoxio ... likely be in B'ham first week of December. You are a much, MUCH braver man than I. |
#44
| |||
| |||
|
|
From: DA Morgan <damorgan (AT) psoug (DOT) org Obnoxio The Clown wrote: DA Morgan said: BTW: Obnoxio ... likely be in B'ham first week of December. You are a much, MUCH braver man than I. Scotch helps. -- Daniel A. Morgan |
#45
| |||
| |||
|
|
From: DA Morgan <damorgan (AT) psoug (DOT) org Obnoxio The Clown wrote: DA Morgan said: BTW: Obnoxio ... likely be in B'ham first week of December. You are a much, MUCH braver man than I. Scotch helps. -- Daniel A. Morgan I can't believe that OTC is afraid of a place like B'ham. After all, it can't be worse than Jo Berg.... |
(
#46
| |||
| |||
|
|
Ian Michael Gumby wrote: From: Serge Rielau <srielau (AT) ca (DOT) ibm.com> > The OP's statement most likely stems from not understanding the differences between the two products. I don't think so.... Here is my take: The advantage of session-local temporary tables, that is tables who's definition is not persisted in the catalog has the advantage that ad-hoc tables can be created quickly without impacting the catalog and without a care whether some other session may have a table with the same name (but a different signature) The downside of this behavior is that it's somewhat challenging to use these kinds of tables across multiple objects because there is no guarantee that the procedure that is trying to use Temp1 actually gets Temp1 in the shape it expects it to be. You're going to have to be a bit more specific in how you define "object". "Object" has different meanings to different people.... The disadvantage that you state is kind of meaningless in practice. If you think about it, the temp table is only persistant during a connection. So that the calling app that instantiated the connection should know how or what is defined by the temp table. And the name temp1 has to be unique per connection. (Meaning that connection A can create a temp1 table and connection B can create a temp table temp1 but they will be different objects...) The huge problem with Oracle's temp tables is that their definition isnt temp, its global. What is temporary is the data that you can maintain in the temp will last only as long as the session. So what happens if I want to load in 300,000 rows of temp data in to the temp table and there's no index on the table? (Hint: SEQUENTIAL SCAN OF THE TABLE). In Oracle, you can't create an index on a temp table if there are any rows in it, and you can't control who/what someone else does to the temp table. Interesting. I didn't know Oracle had this funny limitation. Either way that limitation is not core to the "concept" of a CREATEd temporary table. |
#47
| |||
| |||
|
|
Serge Rielau wrote: Ian Michael Gumby wrote: From: Serge Rielau <srielau (AT) ca (DOT) ibm.com> > The OP's statement most likely stems from not understanding the differences between the two products. I don't think so.... Here is my take: The advantage of session-local temporary tables, that is tables who's definition is not persisted in the catalog has the advantage that ad-hoc tables can be created quickly without impacting the catalog and without a care whether some other session may have a table with the same name (but a different signature) The downside of this behavior is that it's somewhat challenging to use these kinds of tables across multiple objects because there is no guarantee that the procedure that is trying to use Temp1 actually gets Temp1 in the shape it expects it to be. You're going to have to be a bit more specific in how you define "object". "Object" has different meanings to different people.... The disadvantage that you state is kind of meaningless in practice. If you think about it, the temp table is only persistant during a connection. So that the calling app that instantiated the connection should know how or what is defined by the temp table. And the name temp1 has to be unique per connection. (Meaning that connection A can create a temp1 table and connection B can create a temp table temp1 but they will be different objects...) The huge problem with Oracle's temp tables is that their definition isnt temp, its global. What is temporary is the data that you can maintain in the temp will last only as long as the session. So what happens if I want to load in 300,000 rows of temp data in to the temp table and there's no index on the table? (Hint: SEQUENTIAL SCAN OF THE TABLE). In Oracle, you can't create an index on a temp table if there are any rows in it, and you can't control who/what someone else does to the temp table. Interesting. I didn't know Oracle had this funny limitation. Either way that limitation is not core to the "concept" of a CREATEd temporary table. Speaking about limitations / differences... Are inserts / deletes / updates on Oracle temp tables still logged? I remember "older versions" and I believe this was so, but I'm not sure as to whether it was or still is . . . . JWC |
#48
| |||
| |||
|
|
From: DA Morgan <damorgan (AT) psoug (DOT) org [SNIP] |
#49
| |||||||||||||||
| |||||||||||||||
|
| From: DA Morgan <damorgan (AT) psoug (DOT) org [SNIP] Sigh. This is a design issue that shows that while there are general concepts which are the same across different platforms, there some subtle differences which will impact performance. The implementation of Temp tables in Oracle is wrong. Ugly, inefficient and barely supports the idea of the "INTO TEMP" clause that I believe is part of the SQL standard. |
|
Now when I say "WRONG", I'm talking from a purely design perspective. |
|
(In truth there is no right or wrong, its a question about how to interpret the requirements and does the solution meet the stated goals. ) |
|
However, as a developer if I want to KISS (that's an engineering term), I want to have my temp tables defined dynamically and be unique in that I don't incur overhead or issues from other implementations. |
|
The example I've used is that you can not create an index on a temp table if the table has data anywhere. |
|
That is even if I trunc my data, a different user could still have data in the temp table. So I can't create an index. While this may seem like a small nit, its not. When you're doing some computations on a subset, or need to create a functional index on the subset. So creating and dropping indexes on subsets is not possible. |
|
An example? Suppose I have a field where the value is a bitmask and I only want to select a certain portion for processing. I can't easily do this with Oracle's temp tables. Hence the issue. |
|
The "right" solution allows the developer a lot of freedom and still conforms to the spec. Hence the preference for IDS. |
|
On a completely different topic, is the extensibility issue. (Don't get me started on Oracle's "extensibility....". And to keep this issue simple, lets talk about Sybase's adaptive server. |
|
Its extensible, however, they didn't fence in the user/developer's code so that if there is ineffcient code, it will kill the performance of the entire database. Note that even if the code looks clean, it can still be inefficient. |
|
Again kudos to IDS's developers who thought things out before implementations. ER/HDR anyone? |
|
That is the point. Its a better designed system. |
|
And DA, you keep citing statistics about open rec's for FTEs. |
|
Here's an example I think you might be able to grasp. |
|
Porsche doesn't have a "green" car in its line up. The company defended itself by saying that if you took all the Porsche vehicles off the road, you'd have a less than 1% impact on CO2 emmissions from automobiles. |
#50
| |||
| |||
|
|
Ian Michael Gumby wrote: From: DA Morgan <damorgan (AT) psoug (DOT) org [SNIP] Sigh. This is a design issue that shows that while there are general concepts which are the same across different platforms, there some subtle differences which will impact performance. The implementation of Temp tables in Oracle is wrong. Ugly, inefficient and barely supports the idea of the "INTO TEMP" clause that I believe is part of the SQL standard. This is the most preposterous statement I've heard in quite awhile not because, quite simply, there is no basis in fact. Allow me to prove it. 1. On what version of Oracle did you test Oracle's temp tables? 2. Which temp table types did you test? 3. With what tool did you gather the metrics? 4. Post the test design, the DDL, the DML, and the results. Your statement has as much basis in fact as saying swordfish is better than salmon. You think what Informix does, is better. Put up the test case. Now when I say "WRONG", I'm talking from a purely design perspective. And purely from the perspective of someone who doesn't work with undo segments and undo tablespaces and doesn't understand the architecture underlying MVRC and has no actual basis for the opinion other than that he likes blue more than red. (In truth there is no right or wrong, its a question about how to interpret the requirements and does the solution meet the stated goals. ) Closer to the facts but a waffle given the above rant. However, as a developer if I want to KISS (that's an engineering term), I want to have my temp tables defined dynamically and be unique in that I don't incur overhead or issues from other implementations. Which means you don't want to write code the creates and drops them on-the-fly. Far better to create them, index them, constrain them, and let them take care of themselves forever. But that would conflict with your overriding prejudice against anything non-Informix. The example I've used is that you can not create an index on a temp table if the table has data anywhere. Of course not. Buiding indexes on-the-fly in a production database is not just silly it is counterproductive adding unnecessary overhead. If you design systems rather than just throw them over the cubicle wall then you design your table, you design your indexes, you build them during schema creation, and you leave them alone for all to use and for the life of the application. Complaining that an implementation doesn't let you create objects that the optimizer might want to know about any time you feel like it is the very core of bad practice. That is even if I trunc my data, a different user could still have data in the temp table. So I can't create an index. While this may seem like a small nit, its not. When you're doing some computations on a subset, or need to create a functional index on the subset. So creating and dropping indexes on subsets is not possible. Nor should it be. Do you think creating and dropping objects has no cost? An example? Suppose I have a field where the value is a bitmask and I only want to select a certain portion for processing. I can't easily do this with Oracle's temp tables. Hence the issue. Sure you can. Of course provided you know how. If you have a problem why don't you tell us about it in the Oracle usenet group and we will help you solve it. The "right" solution allows the developer a lot of freedom and still conforms to the spec. Hence the preference for IDS. So far you've not given a single example of this but I doubt that will stop you ... you're on a roll. On a completely different topic, is the extensibility issue. (Don't get me started on Oracle's "extensibility....". And to keep this issue simple, lets talk about Sybase's adaptive server. Why not other than, it would seem, the fact that you know nothing about it with respect to any currently supported version of the product. Its extensible, however, they didn't fence in the user/developer's code so that if there is ineffcient code, it will kill the performance of the entire database. Note that even if the code looks clean, it can still be inefficient. Explaining, it would seem, why it is that Sybase is currently outselling Informix by a wide margin. And why Sybase shops are looking for employees for real-work while Informix shops are not: dice.com monster.com hotjobs.com Sybase 2,146 304 548 Informix 343 43 173 jobs available as of 5 November, 2007. |
|
You are presiding over a funeral so it is understandable that you would praise the departed. Just like WordStar, just like Lotus 123, just like Borland Pascal. And this somehow trumps the fact that not a single college or university on the planet offers a single class for Informix. The next generation of developers and DBAs is coming from where? Apparently the same place new sales are coming from? The tooth fairy. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |