Subject | Re: Re: [firebird-support] Is it natual ? |
---|---|
Author | xuxu |
Post date | 2005-04-01T01:22:19Z |
Milan Babuskov:
select count(cdrid) from callingcdr where domainno = 1 and callingtime > '2005-03-30' ;
table callingcdr:
ALTER TABLE CALLINGCDR ADD CONSTRAINT PK_CALLINGCDR PRIMARY KEY (CDRID);
/******************************************************************************/
/**** Indices ****/
/******************************************************************************/
CREATE INDEX CALLINGCDR_IDX1 ON CALLINGCDR (CALLINGTIME, DOMAINNO, CALLINGNO);
CREATE INDEX CALLINGCDR_IDX2 ON CALLINGCDR (AREACODE, CALLINGTIME, DOMAINNO);
select count(cdrid) from callingcdr where domainno = 1 and callingtime > '2005-03-30' ;
table callingcdr:
ALTER TABLE CALLINGCDR ADD CONSTRAINT PK_CALLINGCDR PRIMARY KEY (CDRID);
/******************************************************************************/
/**** Indices ****/
/******************************************************************************/
CREATE INDEX CALLINGCDR_IDX1 ON CALLINGCDR (CALLINGTIME, DOMAINNO, CALLINGNO);
CREATE INDEX CALLINGCDR_IDX2 ON CALLINGCDR (AREACODE, CALLINGTIME, DOMAINNO);
>xuxu wrote:= = = = = = = = = = = = = = = = = = = =
>> There are about 6-8 connections with my FB db. The operations will become slowly when they operate the db at the same time .Spended time of a operation will be 30-3000 seconds .The operations normally like these:
>> 1. select count(cdrid) from callingcdr where ...;
>> 2. select sum(dialfee) from callingcdr where ...;
>> 3. select feerate from feetbl where areacode like '0'||'' ;
>> ( 1000 records in the table feetbl, Indexed )
>>
>> Does it seem natual ?
>
>You sure mean: natural.
>
>Show us the PLAN for these queries.
>
>--
>Milan Babuskov
>http://fbexport.sourceforge.net
>http://www.flamerobin.org
>
>
>
>
>Yahoo! Groups Links
>
>
>
>