Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select big table very slow [CORE5885] #6143

Open
firebird-automations opened this issue Aug 7, 2018 · 2 comments
Open

Select big table very slow [CORE5885] #6143

firebird-automations opened this issue Aug 7, 2018 · 2 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: richard ding (bean66)

Hi,

There is a very large table(10 million records ). When the table is queried, if the parameters carried are not assigned, the query is very slow.
Example:

CREATE TABLE WORKBILL (
BEDID INTEGER,
GRPID INTEGER,
WORKINGORDER SMALLINT NOT NULL,
WBNO VARCHAR(15) NOT NULL,
EMPLOYEEID INTEGER,
QUANTITY SMALLINT DEFAULT 1 NOT NULL,
BADPIECES SMALLINT DEFAULT 0 NOT NULL,
OPENDATE DATE DEFAULT 'NOW',
CLOSEDATE DATE,
QSCALE DOUBLE RPECISION,
USERID INTEGER,
WDEPARTID INTEGER DEFAULT -1 NOT NULL,
UPDATETIME TIMESTAMP,
ISADJUST INTEGER,
TIMELONG INTEGER,
PRIMARY KEY(BEDID)
);

CREATE INDEX WORKBILL_IDX1 ON WORKBILL (CLOSEDATE);

--------------------------
USE IBExpert OR FireDac FDQUERY

SELECT * FROM WORKBILL WHERE CLOSEDATE BETWEEN :BEGINDATE AND :ENDDATE ;

if the parameters carried are not assigned, the query is very slow. result empty

@firebird-automations
Copy link
Collaborator Author

Modified by: richard ding (bean66)

description: Hi,

There is a very large table. When the table is queried, if the parameters carried are not assigned, the query is very slow.
Example:

=>

Hi,

There is a very large table(10 million records ). When the table is queried, if the parameters carried are not assigned, the query is very slow.
Example:

CREATE TABLE WORKBILL (
BEDID INTEGER,
GRPID INTEGER,
WORKINGORDER SMALLINT NOT NULL,
WBNO VARCHAR(15) NOT NULL,
EMPLOYEEID INTEGER,
QUANTITY SMALLINT DEFAULT 1 NOT NULL,
BADPIECES SMALLINT DEFAULT 0 NOT NULL,
OPENDATE DATE DEFAULT 'NOW',
CLOSEDATE DATE,
QSCALE DOUBLE RPECISION,
USERID INTEGER,
WDEPARTID INTEGER DEFAULT -1 NOT NULL,
UPDATETIME TIMESTAMP,
ISADJUST INTEGER,
TIMELONG INTEGER,
PRIMARY KEY(BEDID)
);

CREATE INDEX WORKBILL_IDX1 ON WORKBILL (CLOSEDATE);

--------------------------
USE IBExpert OR FireDac FDQUERY

SELECT * FROM WORKBILL WHERE CLOSEDATE BETWEEN :BEGINDATE AND :ENDDATE ;

if the parameters carried are not assigned, the query is very slow. result empty

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

This is a support issue that should be posted to the Support Mailing list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant