[DUG] Frebird index question
russell
russell at belding.co.nz
Mon Oct 29 09:56:49 NZDT 2012
Hello John
I think the answer is yes but cannot point to a document.
You could run a GBAK save and restore against your DB. This will rebuild all indices. (best)
You could run SET STATISTICS INDEX MYINDEXNAME to recomputed the index selectivity. (not best)
Do you have a tool for looking at the plan of your SQL? Is it using the index you made?
You can use PLAN(MYTABLE INDEX (MYINDEXNAME)) in your SQL.
Are you at FB 2.5.1 or later? Good.
The optimiser is much smarter than in FB 1.5.x.
Are you confident your SQL should use the index you made?
You could post your metadata here for fun …
Russell
From: delphi-bounces at listserver.123.net.nz [mailto:delphi-bounces at listserver.123.net.nz] On Behalf Of John Bird
Sent: Monday, 29 October 2012 9:27 a.m.
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] Frebird index question
Firebird V2
I have a large table (5,500,000+ records) that I just added an index to to speed some queries. So far it has not made much difference – is the existing data indexed immediately on creating the index?
John Bird
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20121029/412a48e1/attachment.html
More information about the Delphi
mailing list