Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 07:14 AM
PK
 
Posts: n/a
Default Isolation levels in Informix vs Oracle

Hi,

As you know Informix offers 'set isolation to dirty read' - a facility
to read dirty buffers. I believe DB2 UDB too offers it but not Oracle.

What is the neccessity or justification for an RDBMS to offer such a
feature and do applications really need it ? I was told by an Oracle
guy that Informix and DB2 are 'forced' to offer this because of their
architecture and this is not a 'feature' as such ! He says Oracle can
offer it in a 'jiffy' by pointing to its undo tablespace (where before
images of a buffer are kept before modifications) but they will not as
this is not justified !

I myself (worked with Informix for 9 yrs but now into Oracle for past
1 yr ) feel its quite cool. However I would like to get expert
technical opinion. I don't intend to start a flame at all !

Many thanks
Prashant
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 07:14 AM
rkusenet
 
Posts: n/a
Default Re: Isolation levels in Informix vs Oracle


"PK" <pk26au@yahoo.com> wrote in message
news:667bf0c6.0412150133.7e4ce123@posting.google.c om...
> Hi,
>
> As you know Informix offers 'set isolation to dirty read' - a facility
> to read dirty buffers. I believe DB2 UDB too offers it but not Oracle.
>
> What is the neccessity or justification for an RDBMS to offer such a
> feature and do applications really need it ? I was told by an Oracle
> guy that Informix and DB2 are 'forced' to offer this because of their
> architecture and this is not a 'feature' as such ! He says Oracle can
> offer it in a 'jiffy' by pointing to its undo tablespace (where before
> images of a buffer are kept before modifications) but they will not as
> this is not justified !
> I myself (worked with Informix for 9 yrs but now into Oracle for past
> 1 yr ) feel its quite cool. However I would like to get expert
> technical opinion. I don't intend to start a flame at all !


dirty read is very useful when the application gurantees that the data being
read is at that instant read-only. For e.g. in a transaction table where you
are generating report for yesterday. You know for sure that all new records
in that table will be for today only. Why bother locking. Dirty read will
do the job just as fine with minimum resource contention.

Similarly there are circumstances where committed read, repeatable read
and serializable read are also useful. . Each has different concurrency
level
and must be used appropriately.

The problem with most the developers is that they know jackshit about
isolation level and concurrency issues and they go with default with
whatever JDBC offers. On that count Oracle's versioning feature is
cool. It is really an idiot-proof feature. But beyond that it is nothing
to crow about.

SQL Server 2005 is offering the same versioning by calling itself
READ_CONSISTENCY. But unlike Oracle, it also offers other
isolation modes of Informix/Db2. Use them where they are appropriate.





Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 07:14 AM
rkusenet
 
Posts: n/a
Default Re: Isolation levels in Informix vs Oracle

to add more, because of Oracle's versioning feature, I feel that its
FOR UPDATE technique is less efficient. For e.g if there is a
work flow table where competing sessions try to grab the first
available row in the queue. May be that's why Oracle recommends
using AQ tables for such a task.

"rkusenet" <rkusenet@sympatico.ca> wrote in message
news:32aifdF3j06m1U1@individual.net...
>
> "PK" <pk26au@yahoo.com> wrote in message
> news:667bf0c6.0412150133.7e4ce123@posting.google.c om...
> > Hi,
> >
> > As you know Informix offers 'set isolation to dirty read' - a facility
> > to read dirty buffers. I believe DB2 UDB too offers it but not Oracle.
> >
> > What is the neccessity or justification for an RDBMS to offer such a
> > feature and do applications really need it ? I was told by an Oracle
> > guy that Informix and DB2 are 'forced' to offer this because of their
> > architecture and this is not a 'feature' as such ! He says Oracle can
> > offer it in a 'jiffy' by pointing to its undo tablespace (where before
> > images of a buffer are kept before modifications) but they will not as
> > this is not justified !
> > I myself (worked with Informix for 9 yrs but now into Oracle for past
> > 1 yr ) feel its quite cool. However I would like to get expert
> > technical opinion. I don't intend to start a flame at all !

>
> dirty read is very useful when the application gurantees that the data

being
> read is at that instant read-only. For e.g. in a transaction table where

you
> are generating report for yesterday. You know for sure that all new

records
> in that table will be for today only. Why bother locking. Dirty read will
> do the job just as fine with minimum resource contention.
>
> Similarly there are circumstances where committed read, repeatable read
> and serializable read are also useful. . Each has different concurrency
> level
> and must be used appropriately.
>
> The problem with most the developers is that they know jackshit about
> isolation level and concurrency issues and they go with default with
> whatever JDBC offers. On that count Oracle's versioning feature is
> cool. It is really an idiot-proof feature. But beyond that it is nothing
> to crow about.
>
> SQL Server 2005 is offering the same versioning by calling itself
> READ_CONSISTENCY. But unlike Oracle, it also offers other
> isolation modes of Informix/Db2. Use them where they are appropriate.
>
>
>
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 07:14 AM
Serge Rielau
 
Posts: n/a
Default Re: Isolation levels in Informix vs Oracle

PK wrote:
> Hi,
>
> As you know Informix offers 'set isolation to dirty read' - a facility
> to read dirty buffers. I believe DB2 UDB too offers it but not Oracle.
>
> What is the neccessity or justification for an RDBMS to offer such a
> feature and do applications really need it ? I was told by an Oracle
> guy that Informix and DB2 are 'forced' to offer this because of their
> architecture and this is not a 'feature' as such ! He says Oracle can
> offer it in a 'jiffy' by pointing to its undo tablespace (where before
> images of a buffer are kept before modifications) but they will not as
> this is not justified !
>
> I myself (worked with Informix for 9 yrs but now into Oracle for past
> 1 yr ) feel its quite cool. However I would like to get expert
> technical opinion. I don't intend to start a flame at all !
>
> Many thanks
> Prashant

When all you have is a hammer everything looks like a nail....
Here is my take:
Dirty read shows data that potentially gets rolled back and hence there
is a potential to mess up data integrity in case of rollback.
Read consistency shows data that may be stale and hence there us a
potential to mess up data integrity in case of commit.

Both have their uses, both have their faults.

For transaction processing there is only one isolation level that is
correct: Repeatable Read/Serializable. Anything else has various degrees
of buyer beware.

Sidenote: SEQUENCE is "dirty read" by definition and it is quite popular
in Oracle :-)

Cheers
Serge
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 07:14 AM
DA Morgan
 
Posts: n/a
Default Re: Isolation levels in Informix vs Oracle

rkusenet wrote:

> "PK" <pk26au@yahoo.com> wrote in message
> news:667bf0c6.0412150133.7e4ce123@posting.google.c om...
>
>>Hi,
>>
>>As you know Informix offers 'set isolation to dirty read' - a facility
>>to read dirty buffers. I believe DB2 UDB too offers it but not Oracle.
>>
>>What is the neccessity or justification for an RDBMS to offer such a
>>feature and do applications really need it ? I was told by an Oracle
>>guy that Informix and DB2 are 'forced' to offer this because of their
>>architecture and this is not a 'feature' as such ! He says Oracle can
>>offer it in a 'jiffy' by pointing to its undo tablespace (where before
>>images of a buffer are kept before modifications) but they will not as
>>this is not justified !
>>I myself (worked with Informix for 9 yrs but now into Oracle for past
>>1 yr ) feel its quite cool. However I would like to get expert
>>technical opinion. I don't intend to start a flame at all !

>
>
> dirty read is very useful when the application gurantees that the data being
> read is at that instant read-only. For e.g. in a transaction table where you
> are generating report for yesterday. You know for sure that all new records
> in that table will be for today only. Why bother locking. Dirty read will
> do the job just as fine with minimum resource contention.


The problem with your analogy is that if by definition it is yesterday's
(or read-only) data and no changes are taking place you don't have
anything dirty to read. With read-only data any database, with any
transaction type, will give a valid answer.

Can you address the dirty read issue in a situation where there truly is
dirty data.

Thanks.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-20-2008, 07:15 AM
DA Morgan
 
Posts: n/a
Default Re: Isolation levels in Informix vs Oracle

rkusenet wrote:

> to add more, because of Oracle's versioning feature, I feel that its
> FOR UPDATE technique is less efficient. For e.g if there is a
> work flow table where competing sessions try to grab the first
> available row in the queue. May be that's why Oracle recommends
> using AQ tables for such a task.


It would certainly be my recommendation in Oracle to use Advanced
Queuing or Streams. But from my experience FOR UPDATE works in 99+%
of all similar situations. You lock it if you're first ... you don't
if otherwise.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-20-2008, 07:15 AM
DA Morgan
 
Posts: n/a
Default Re: Isolation levels in Informix vs Oracle

Serge Rielau wrote:

> Sidenote: SEQUENCE is "dirty read" by definition and it is quite popular
> in Oracle :-)
>
> Cheers
> Serge


By whose definition? Certainly none I have ever heard.

--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-20-2008, 07:15 AM
Serge Rielau
 
Posts: n/a
Default Re: Isolation levels in Informix vs Oracle

DA Morgan wrote:
> Serge Rielau wrote:
>
>> Sidenote: SEQUENCE is "dirty read" by definition and it is quite
>> popular in Oracle :-)
>>
>> Cheers
>> Serge

>
>
> By whose definition? Certainly none I have ever heard.
>

The freedom of double-quotes Daniel. Open your mind:
If you open two connections to Oracle and perform a few NEXTVALs in each
without cout committing. Then you roll one connections transaction back
the values are "lost". But the second connection was very well affected
by the lost values: "Dirty read".
SEQUENCEs don't no squat about transactions and isolation levels.
Note that I don't blame anyone. Sequences do exactly what they are
designed to do, just like a regular dirty read (no double quotes) does
exactly what it's designed to do.

Cheers
Serge
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-20-2008, 07:15 AM
rkusenet
 
Posts: n/a
Default Re: Isolation levels in Informix vs Oracle


"DA Morgan" <damorgan@x.washington.edu> wrote
> The problem with your analogy is that if by definition it is yesterday's
> (or read-only) data and no changes are taking place you don't have
> anything dirty to read. With read-only data any database, with any
> transaction type, will give a valid answer.


> Can you address the dirty read issue in a situation where there truly is
> dirty data.


This is red herring.

The 'dirty read' I mentioned in my example refers to the isolation level
provided by Informix/DB2/SS. I am not here to debate whether the
nomenclature
of dirty read is technically correct, English usage wise. If this pleases
you,
we can call it READ_UNCOMMITTED as it is known in ANSI lingo.

It was in response to the original poster's question about where different
isolation level is required. To quote him:-

"What is the neccessity or justification for an RDBMS to offer such a
feature and do applications really need it ?"

I gave one example, where if I were the developer, I would use only dirty
read for maximum performance. To claim that 'dirty read' isolation level is
useless in real world (which you have done in the past) is a bogus claim.

For the same example, Oracle will also give a valid answer, but not without
ascertaining for every block whether it has been updated since the query
began,
as part of its process for maintaining read consistency. Now this is
something
which has overhead. Nothing comes free.






Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-20-2008, 07:15 AM
DA Morgan
 
Posts: n/a
Default Re: Isolation levels in Informix vs Oracle

Serge Rielau wrote:
> DA Morgan wrote:
>
>> Serge Rielau wrote:
>>
>>> Sidenote: SEQUENCE is "dirty read" by definition and it is quite
>>> popular in Oracle :-)
>>>
>>> Cheers
>>> Serge

>>
>>
>>
>> By whose definition? Certainly none I have ever heard.
>>

> The freedom of double-quotes Daniel. Open your mind:
> If you open two connections to Oracle and perform a few NEXTVALs in each
> without cout committing. Then you roll one connections transaction back
> the values are "lost". But the second connection was very well affected
> by the lost values: "Dirty read".
> SEQUENCEs don't no squat about transactions and isolation levels.
> Note that I don't blame anyone. Sequences do exactly what they are
> designed to do, just like a regular dirty read (no double quotes) does
> exactly what it's designed to do.
>
> Cheers
> Serge


I can't wrap my mind around your thought that sequence NEXTVAL in any
way relates to a dirty read. Here's why:

CREATE TABLE mytable (
mycol NUMBER);

CREATE TABLE t (
seqno NUMBER);

INSERT INTO t VALUES (1);
COMMIT;

INSERT INTO mytable
SELECT seqno
FROM t;

ROLLBACK;

UPDATE t
SET seqno = seqno+1;

COMMIT;

Do you see a dirty read? I don't. The fact that a transaction didn't
take place but the sequence number was lost is not a dirty read. So
I just don't get your thinking.

Note: No double quotes.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace 'x' with 'u' to respond)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:28 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
UnixAdminTalk.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578