Unix Technical Forum

Re: Let me be the first

This is a discussion on Re: Let me be the first within the Informix forums, part of the Database Server Software category; --> Mark Jamison wrote: > Hi Lukas, > > Are you saying that you have 1 composite index on col1, ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 01:07 PM
Lukas Barton
 
Posts: n/a
Default Re: Let me be the first

Mark Jamison wrote:
> Hi Lukas,
>
> Are you saying that you have 1 composite index on col1, and col2 ?
>
> Or are you saying that you have 1 index on col1 and 1 index on col2?

I have two indexes.
One on col1 and the other on col2.

>
>
> For that matter, currently how large is each of your indices?

There are only two values for each index.

See my test SQL (table1 = dotaz, col1=status, col2=iddavky, all indexed
columns == foreing key):

begin work;
set isolation to committed read;
update dotaz set status=10 where iddavky=11000958;
commit work;


begin work;
set isolation to committed read;
select * from dotaz where iddavky=11000969; -- waits until the first
thread commits
commit work;





CREATE TABLE dotaz
(
id decimal(10) PRIMARY KEY,
nazev varchar(50),
poradi decimal(10),
koddotazu varchar(20),
idsablona decimal(10),
iddavky decimal(10),
metatypchyby_id decimal(10),
status decimal(10),
errorcode decimal(3),
importch_id decimal(10)
);



INSERT INTO dotaz
(id,nazev,poradi,koddotazu,idsablona,iddavky,metat ypchyby_id,status,errorcode,importch_id)
VALUES (32979,'DOTAZ_0',null,'0',2531,11000958,1,10,0,nul l);
INSERT INTO dotaz
(id,nazev,poradi,koddotazu,idsablona,iddavky,metat ypchyby_id,status,errorcode,importch_id)
VALUES (32980,'DOTAZ_1',null,'1',2532,11000958,1,10,0,nul l);

INSERT INTO dotaz
(id,nazev,poradi,koddotazu,idsablona,iddavky,metat ypchyby_id,status,errorcode,importch_id)
VALUES (33026,'DOTAZ_23',null,'23',2532,11000969,1,110,0, null);
INSERT INTO dotaz
(id,nazev,poradi,koddotazu,idsablona,iddavky,metat ypchyby_id,status,errorcode,importch_id)
VALUES (33027,'DOTAZ_24',null,'24',2531,11000969,1,110,0, null);


CREATE INDEX 109_96 ON dotaz(status);
CREATE INDEX 109_95 ON dotaz(idsablona);
CREATE INDEX 109_94 ON dotaz(iddavky);
CREATE INDEX 109_93 ON dotaz(importch_id);
CREATE INDEX 109_92 ON dotaz(metatypchyby_id);


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 11:32 AM.


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